aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/htc-i2cpld.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/htc-i2cpld.c')
-rw-r--r--drivers/mfd/htc-i2cpld.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c
index 594c9a8e25e1..296ad1562f69 100644
--- a/drivers/mfd/htc-i2cpld.c
+++ b/drivers/mfd/htc-i2cpld.c
@@ -82,25 +82,25 @@ struct htcpld_data {
82/* There does not appear to be a way to proactively mask interrupts 82/* There does not appear to be a way to proactively mask interrupts
83 * on the htcpld chip itself. So, we simply ignore interrupts that 83 * on the htcpld chip itself. So, we simply ignore interrupts that
84 * aren't desired. */ 84 * aren't desired. */
85static void htcpld_mask(unsigned int irq) 85static void htcpld_mask(struct irq_data *data)
86{ 86{
87 struct htcpld_chip *chip = get_irq_chip_data(irq); 87 struct htcpld_chip *chip = irq_data_get_irq_chip_data(data);
88 chip->irqs_enabled &= ~(1 << (irq - chip->irq_start)); 88 chip->irqs_enabled &= ~(1 << (data->irq - chip->irq_start));
89 pr_debug("HTCPLD mask %d %04x\n", irq, chip->irqs_enabled); 89 pr_debug("HTCPLD mask %d %04x\n", data->irq, chip->irqs_enabled);
90} 90}
91static void htcpld_unmask(unsigned int irq) 91static void htcpld_unmask(struct irq_data *data)
92{ 92{
93 struct htcpld_chip *chip = get_irq_chip_data(irq); 93 struct htcpld_chip *chip = irq_data_get_irq_chip_data(data);
94 chip->irqs_enabled |= 1 << (irq - chip->irq_start); 94 chip->irqs_enabled |= 1 << (data->irq - chip->irq_start);
95 pr_debug("HTCPLD unmask %d %04x\n", irq, chip->irqs_enabled); 95 pr_debug("HTCPLD unmask %d %04x\n", data->irq, chip->irqs_enabled);
96} 96}
97 97
98static int htcpld_set_type(unsigned int irq, unsigned int flags) 98static int htcpld_set_type(struct irq_data *data, unsigned int flags)
99{ 99{
100 struct irq_desc *d = irq_to_desc(irq); 100 struct irq_desc *d = irq_to_desc(data->irq);
101 101
102 if (!d) { 102 if (!d) {
103 pr_err("HTCPLD invalid IRQ: %d\n", irq); 103 pr_err("HTCPLD invalid IRQ: %d\n", data->irq);
104 return -EINVAL; 104 return -EINVAL;
105 } 105 }
106 106
@@ -118,10 +118,10 @@ static int htcpld_set_type(unsigned int irq, unsigned int flags)
118} 118}
119 119
120static struct irq_chip htcpld_muxed_chip = { 120static struct irq_chip htcpld_muxed_chip = {
121 .name = "htcpld", 121 .name = "htcpld",
122 .mask = htcpld_mask, 122 .irq_mask = htcpld_mask,
123 .unmask = htcpld_unmask, 123 .irq_unmask = htcpld_unmask,
124 .set_type = htcpld_set_type, 124 .irq_set_type = htcpld_set_type,
125}; 125};
126 126
127/* To properly dispatch IRQ events, we need to read from the 127/* To properly dispatch IRQ events, we need to read from the
@@ -235,7 +235,7 @@ static irqreturn_t htcpld_handler(int irq, void *dev)
235 * and that work is scheduled in the set routine. The kernel can then run 235 * and that work is scheduled in the set routine. The kernel can then run
236 * the I2C functions, which will sleep, in process context. 236 * the I2C functions, which will sleep, in process context.
237 */ 237 */
238void htcpld_chip_set(struct gpio_chip *chip, unsigned offset, int val) 238static void htcpld_chip_set(struct gpio_chip *chip, unsigned offset, int val)
239{ 239{
240 struct i2c_client *client; 240 struct i2c_client *client;
241 struct htcpld_chip *chip_data; 241 struct htcpld_chip *chip_data;
@@ -259,7 +259,7 @@ void htcpld_chip_set(struct gpio_chip *chip, unsigned offset, int val)
259 schedule_work(&(chip_data->set_val_work)); 259 schedule_work(&(chip_data->set_val_work));
260} 260}
261 261
262void htcpld_chip_set_ni(struct work_struct *work) 262static void htcpld_chip_set_ni(struct work_struct *work)
263{ 263{
264 struct htcpld_chip *chip_data; 264 struct htcpld_chip *chip_data;
265 struct i2c_client *client; 265 struct i2c_client *client;
@@ -269,7 +269,7 @@ void htcpld_chip_set_ni(struct work_struct *work)
269 i2c_smbus_read_byte_data(client, chip_data->cache_out); 269 i2c_smbus_read_byte_data(client, chip_data->cache_out);
270} 270}
271 271
272int htcpld_chip_get(struct gpio_chip *chip, unsigned offset) 272static int htcpld_chip_get(struct gpio_chip *chip, unsigned offset)
273{ 273{
274 struct htcpld_chip *chip_data; 274 struct htcpld_chip *chip_data;
275 int val = 0; 275 int val = 0;
@@ -316,7 +316,7 @@ static int htcpld_direction_input(struct gpio_chip *chip,
316 return (offset < chip->ngpio) ? 0 : -EINVAL; 316 return (offset < chip->ngpio) ? 0 : -EINVAL;
317} 317}
318 318
319int htcpld_chip_to_irq(struct gpio_chip *chip, unsigned offset) 319static int htcpld_chip_to_irq(struct gpio_chip *chip, unsigned offset)
320{ 320{
321 struct htcpld_chip *chip_data; 321 struct htcpld_chip *chip_data;
322 322
@@ -328,7 +328,7 @@ int htcpld_chip_to_irq(struct gpio_chip *chip, unsigned offset)
328 return -EINVAL; 328 return -EINVAL;
329} 329}
330 330
331void htcpld_chip_reset(struct i2c_client *client) 331static void htcpld_chip_reset(struct i2c_client *client)
332{ 332{
333 struct htcpld_chip *chip_data = i2c_get_clientdata(client); 333 struct htcpld_chip *chip_data = i2c_get_clientdata(client);
334 if (!chip_data) 334 if (!chip_data)