diff options
| author | Alek Du <alek.du@intel.com> | 2010-10-04 11:40:35 -0400 |
|---|---|---|
| committer | Matthew Garrett <mjg@redhat.com> | 2010-10-21 09:36:51 -0400 |
| commit | ffcfff3a8d6cc94f1fb598e0b021c64ce35b5036 (patch) | |
| tree | a902f1d0b09262d9c1b3c63c66b478d06b3af398 | |
| parent | bfa97b7dab708b100040a1335ea0860a8b9ef346 (diff) | |
intel_pmic_gpio: swap the bits and mask args for intel_scu_ipc_update_register
The intel_scu_ipc_update_register 2nd paramter should the bits and 3rd
paramter should be the mask.
This typo was introduced during IPC function changing...
Reported-by: Ryan Zhou <ryan.zhou@intel.com>
Signed-off-by: Alek Du <alek.du@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
| -rw-r--r-- | drivers/platform/x86/intel_pmic_gpio.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/platform/x86/intel_pmic_gpio.c b/drivers/platform/x86/intel_pmic_gpio.c index 5cdcff653918..c6e2a1d4fadc 100644 --- a/drivers/platform/x86/intel_pmic_gpio.c +++ b/drivers/platform/x86/intel_pmic_gpio.c | |||
| @@ -142,16 +142,16 @@ static int pmic_gpio_direction_output(struct gpio_chip *chip, | |||
| 142 | 142 | ||
| 143 | if (offset < 8)/* it is GPIO */ | 143 | if (offset < 8)/* it is GPIO */ |
| 144 | rc = intel_scu_ipc_update_register(GPIO0 + offset, | 144 | rc = intel_scu_ipc_update_register(GPIO0 + offset, |
| 145 | GPIO_DRV | GPIO_DOU | GPIO_DIR, | 145 | GPIO_DRV | (value ? GPIO_DOU : 0), |
| 146 | GPIO_DRV | (value ? GPIO_DOU : 0)); | 146 | GPIO_DRV | GPIO_DOU | GPIO_DIR); |
| 147 | else if (offset < 16)/* it is GPOSW */ | 147 | else if (offset < 16)/* it is GPOSW */ |
| 148 | rc = intel_scu_ipc_update_register(GPOSWCTL0 + offset - 8, | 148 | rc = intel_scu_ipc_update_register(GPOSWCTL0 + offset - 8, |
| 149 | GPOSW_DRV | GPOSW_DOU | GPOSW_RDRV, | 149 | GPOSW_DRV | (value ? GPOSW_DOU : 0), |
| 150 | GPOSW_DRV | (value ? GPOSW_DOU : 0)); | 150 | GPOSW_DRV | GPOSW_DOU | GPOSW_RDRV); |
| 151 | else if (offset > 15 && offset < 24)/* it is GPO */ | 151 | else if (offset > 15 && offset < 24)/* it is GPO */ |
| 152 | rc = intel_scu_ipc_update_register(GPO, | 152 | rc = intel_scu_ipc_update_register(GPO, |
| 153 | 1 << (offset - 16), | 153 | value ? 1 << (offset - 16) : 0, |
| 154 | value ? 1 << (offset - 16) : 0); | 154 | 1 << (offset - 16)); |
| 155 | else { | 155 | else { |
| 156 | printk(KERN_ERR | 156 | printk(KERN_ERR |
| 157 | "%s: invalid PMIC GPIO pin %d!\n", __func__, offset); | 157 | "%s: invalid PMIC GPIO pin %d!\n", __func__, offset); |
| @@ -179,16 +179,16 @@ static void pmic_gpio_set(struct gpio_chip *chip, unsigned offset, int value) | |||
| 179 | { | 179 | { |
| 180 | if (offset < 8)/* it is GPIO */ | 180 | if (offset < 8)/* it is GPIO */ |
| 181 | intel_scu_ipc_update_register(GPIO0 + offset, | 181 | intel_scu_ipc_update_register(GPIO0 + offset, |
| 182 | GPIO_DRV | GPIO_DOU, | 182 | GPIO_DRV | (value ? GPIO_DOU : 0), |
| 183 | GPIO_DRV | (value ? GPIO_DOU : 0)); | 183 | GPIO_DRV | GPIO_DOU); |
| 184 | else if (offset < 16)/* it is GPOSW */ | 184 | else if (offset < 16)/* it is GPOSW */ |
| 185 | intel_scu_ipc_update_register(GPOSWCTL0 + offset - 8, | 185 | intel_scu_ipc_update_register(GPOSWCTL0 + offset - 8, |
| 186 | GPOSW_DRV | GPOSW_DOU | GPOSW_RDRV, | 186 | GPOSW_DRV | (value ? GPOSW_DOU : 0), |
| 187 | GPOSW_DRV | (value ? GPOSW_DOU : 0)); | 187 | GPOSW_DRV | GPOSW_DOU | GPOSW_RDRV); |
| 188 | else if (offset > 15 && offset < 24) /* it is GPO */ | 188 | else if (offset > 15 && offset < 24) /* it is GPO */ |
| 189 | intel_scu_ipc_update_register(GPO, | 189 | intel_scu_ipc_update_register(GPO, |
| 190 | 1 << (offset - 16), | 190 | value ? 1 << (offset - 16) : 0, |
| 191 | value ? 1 << (offset - 16) : 0); | 191 | 1 << (offset - 16)); |
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | static int pmic_irq_type(unsigned irq, unsigned type) | 194 | static int pmic_irq_type(unsigned irq, unsigned type) |
