Patchwork [v8,02/11] ata: zpodd: Add CONFIG_SATA_ZPODD

login
register
mail settings
Submitter Aaron Lu
Date Oct. 29, 2012, 9:01 a.m.
Message ID <1351501298-3716-3-git-send-email-aaron.lu@intel.com>
Download mbox | patch
Permalink /patch/194907/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Aaron Lu - Oct. 29, 2012, 9:01 a.m.
Added a new config CONFIG_SATA_ZPODD, which is ued to support
SATA based zero power ODD. It depends on ACPI, and selects BLK_DEV_SR
as the implementation of ZPODD depends on SCSI sr driver.

2 new files are added, which will be used to host ZPODD related code.
They are empty for this commit.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
---
 drivers/ata/Kconfig  | 12 ++++++++++++
 drivers/ata/Makefile |  1 +
 2 files changed, 13 insertions(+)
 create mode 100644 drivers/ata/sata_zpodd.c
 create mode 100644 drivers/ata/sata_zpodd.h

diff --git a/drivers/ata/sata_zpodd.c b/drivers/ata/sata_zpodd.c
new file mode 100644
index 0000000..e69de29
diff --git a/drivers/ata/sata_zpodd.h b/drivers/ata/sata_zpodd.h
new file mode 100644
index 0000000..e69de29
James Bottomley - Oct. 29, 2012, 6:11 p.m.
On Mon, 2012-10-29 at 17:01 +0800, Aaron Lu wrote:
> Added a new config CONFIG_SATA_ZPODD, which is ued to support
> SATA based zero power ODD. It depends on ACPI, and selects BLK_DEV_SR
> as the implementation of ZPODD depends on SCSI sr driver.
> 
> 2 new files are added, which will be used to host ZPODD related code.
> They are empty for this commit.

I think you actually need to combine this with patch 3 to have it
compile ...

James


> Signed-off-by: Aaron Lu <aaron.lu@intel.com>
> ---
>  drivers/ata/Kconfig  | 12 ++++++++++++
>  drivers/ata/Makefile |  1 +
>  2 files changed, 13 insertions(+)
>  create mode 100644 drivers/ata/sata_zpodd.c
>  create mode 100644 drivers/ata/sata_zpodd.h
> 
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index e08d322..2cdecee 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -58,6 +58,18 @@ config ATA_ACPI
>  	  You can disable this at kernel boot time by using the
>  	  option libata.noacpi=1
>  
> +config SATA_ZPODD
> +	bool "SATA Zero Power ODD Support"
> +	depends on ACPI
> +	select BLK_DEV_SR
> +	default n
> +	help
> +	  This option adds support for SATA ZPODD. It requires both
> +	  ODD and the platform support, and if enabled, will automatically
> +	  power on/off the ODD when certain condition is satisfied. This
> +	  does not impact user's experience of the ODD, only power is saved
> +	  when ODD is not in use(i.e. no disc inside).
> +
>  config SATA_PMP
>  	bool "SATA Port Multiplier support"
>  	default y
> diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
> index 9329daf..a5120ff 100644
> --- a/drivers/ata/Makefile
> +++ b/drivers/ata/Makefile
> @@ -107,3 +107,4 @@ libata-y	:= libata-core.o libata-scsi.o libata-eh.o libata-transport.o
>  libata-$(CONFIG_ATA_SFF)	+= libata-sff.o
>  libata-$(CONFIG_SATA_PMP)	+= libata-pmp.o
>  libata-$(CONFIG_ATA_ACPI)	+= libata-acpi.o
> +obj-$(CONFIG_SATA_ZPODD)	+= sata_zpodd.o
> diff --git a/drivers/ata/sata_zpodd.c b/drivers/ata/sata_zpodd.c
> new file mode 100644
> index 0000000..e69de29
> diff --git a/drivers/ata/sata_zpodd.h b/drivers/ata/sata_zpodd.h
> new file mode 100644
> index 0000000..e69de29


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Aaron Lu - Oct. 30, 2012, 3:19 a.m.
On 10/30/2012 02:11 AM, James Bottomley wrote:
> On Mon, 2012-10-29 at 17:01 +0800, Aaron Lu wrote:
>> Added a new config CONFIG_SATA_ZPODD, which is ued to support
>> SATA based zero power ODD. It depends on ACPI, and selects BLK_DEV_SR
>> as the implementation of ZPODD depends on SCSI sr driver.
>>
>> 2 new files are added, which will be used to host ZPODD related code.
>> They are empty for this commit.
> 
> I think you actually need to combine this with patch 3 to have it
> compile ...

I remembered I tested this, and I just tested the compile again, with
the CONFIG_SATA_ZPODD both on and off, and it didn't have any compile
issue, so I'm not sure if this is a problem...

-Aaron

> 
> James
> 
> 
>> Signed-off-by: Aaron Lu <aaron.lu@intel.com>
>> ---
>>  drivers/ata/Kconfig  | 12 ++++++++++++
>>  drivers/ata/Makefile |  1 +
>>  2 files changed, 13 insertions(+)
>>  create mode 100644 drivers/ata/sata_zpodd.c
>>  create mode 100644 drivers/ata/sata_zpodd.h
>>
>> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
>> index e08d322..2cdecee 100644
>> --- a/drivers/ata/Kconfig
>> +++ b/drivers/ata/Kconfig
>> @@ -58,6 +58,18 @@ config ATA_ACPI
>>  	  You can disable this at kernel boot time by using the
>>  	  option libata.noacpi=1
>>  
>> +config SATA_ZPODD
>> +	bool "SATA Zero Power ODD Support"
>> +	depends on ACPI
>> +	select BLK_DEV_SR
>> +	default n
>> +	help
>> +	  This option adds support for SATA ZPODD. It requires both
>> +	  ODD and the platform support, and if enabled, will automatically
>> +	  power on/off the ODD when certain condition is satisfied. This
>> +	  does not impact user's experience of the ODD, only power is saved
>> +	  when ODD is not in use(i.e. no disc inside).
>> +
>>  config SATA_PMP
>>  	bool "SATA Port Multiplier support"
>>  	default y
>> diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
>> index 9329daf..a5120ff 100644
>> --- a/drivers/ata/Makefile
>> +++ b/drivers/ata/Makefile
>> @@ -107,3 +107,4 @@ libata-y	:= libata-core.o libata-scsi.o libata-eh.o libata-transport.o
>>  libata-$(CONFIG_ATA_SFF)	+= libata-sff.o
>>  libata-$(CONFIG_SATA_PMP)	+= libata-pmp.o
>>  libata-$(CONFIG_ATA_ACPI)	+= libata-acpi.o
>> +obj-$(CONFIG_SATA_ZPODD)	+= sata_zpodd.o
>> diff --git a/drivers/ata/sata_zpodd.c b/drivers/ata/sata_zpodd.c
>> new file mode 100644
>> index 0000000..e69de29
>> diff --git a/drivers/ata/sata_zpodd.h b/drivers/ata/sata_zpodd.h
>> new file mode 100644
>> index 0000000..e69de29
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index e08d322..2cdecee 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -58,6 +58,18 @@  config ATA_ACPI
 	  You can disable this at kernel boot time by using the
 	  option libata.noacpi=1
 
+config SATA_ZPODD
+	bool "SATA Zero Power ODD Support"
+	depends on ACPI
+	select BLK_DEV_SR
+	default n
+	help
+	  This option adds support for SATA ZPODD. It requires both
+	  ODD and the platform support, and if enabled, will automatically
+	  power on/off the ODD when certain condition is satisfied. This
+	  does not impact user's experience of the ODD, only power is saved
+	  when ODD is not in use(i.e. no disc inside).
+
 config SATA_PMP
 	bool "SATA Port Multiplier support"
 	default y
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 9329daf..a5120ff 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -107,3 +107,4 @@  libata-y	:= libata-core.o libata-scsi.o libata-eh.o libata-transport.o
 libata-$(CONFIG_ATA_SFF)	+= libata-sff.o
 libata-$(CONFIG_SATA_PMP)	+= libata-pmp.o
 libata-$(CONFIG_ATA_ACPI)	+= libata-acpi.o
+obj-$(CONFIG_SATA_ZPODD)	+= sata_zpodd.o