aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata.h
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2013-01-15 04:20:58 -0500
committerJeff Garzik <jgarzik@redhat.com>2013-01-21 15:40:35 -0500
commitafe759511808cd5bb508b598007cf0c7b0ca8e08 (patch)
tree26073c5a74b5fe2183aa457da6d9b5cc3d9912bb /drivers/ata/libata.h
parent1757d902b029a29dfcef63609964385cf8865b5a (diff)
libata: identify and init ZPODD devices
The ODD can be enabled for ZPODD if the following three conditions are satisfied: 1 The ODD supports device attention; 2 The platform can runtime power off the ODD through ACPI; 3 The ODD is either slot type or drawer type. For such ODDs, zpodd_init is called and a new structure is allocated for it to store ZPODD related stuffs. And the zpodd_dev_enabled function is used to test if ZPODD is currently enabled for this ODD. A new config CONFIG_SATA_ZPODD is added to selectively build ZPODD code. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata.h')
-rw-r--r--drivers/ata/libata.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 7148a58020b9..a21740b4ee11 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -230,4 +230,18 @@ static inline void ata_sff_exit(void)
230{ } 230{ }
231#endif /* CONFIG_ATA_SFF */ 231#endif /* CONFIG_ATA_SFF */
232 232
233/* libata-zpodd.c */
234#ifdef CONFIG_SATA_ZPODD
235void zpodd_init(struct ata_device *dev);
236void zpodd_exit(struct ata_device *dev);
237static inline bool zpodd_dev_enabled(struct ata_device *dev)
238{
239 return dev->zpodd != NULL;
240}
241#else /* CONFIG_SATA_ZPODD */
242static inline void zpodd_init(struct ata_device *dev) {}
243static inline void zpodd_exit(struct ata_device *dev) {}
244static inline bool zpodd_dev_enabled(struct ata_device *dev) { return false; }
245#endif /* CONFIG_SATA_ZPODD */
246
233#endif /* __LIBATA_H__ */ 247#endif /* __LIBATA_H__ */