diff options
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/twl4030-power.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c index d423e0c4176b..82e3bcbc0097 100644 --- a/drivers/mfd/twl4030-power.c +++ b/drivers/mfd/twl4030-power.c | |||
@@ -69,12 +69,12 @@ static u8 twl4030_start_script_address = 0x2b; | |||
69 | 69 | ||
70 | /* resource configuration registers */ | 70 | /* resource configuration registers */ |
71 | 71 | ||
72 | #define DEVGROUP_OFFSET 0 | 72 | #define DEV_GRP_OFFSET 0 |
73 | #define TYPE_OFFSET 1 | 73 | #define TYPE_OFFSET 1 |
74 | 74 | ||
75 | /* Bit positions */ | 75 | /* Bit positions in the registers */ |
76 | #define DEVGROUP_SHIFT 5 | 76 | #define DEV_GRP_SHIFT 5 |
77 | #define DEVGROUP_MASK (7 << DEVGROUP_SHIFT) | 77 | #define DEV_GRP_MASK (7 << DEV_GRP_SHIFT) |
78 | #define TYPE_SHIFT 0 | 78 | #define TYPE_SHIFT 0 |
79 | #define TYPE_MASK (7 << TYPE_SHIFT) | 79 | #define TYPE_MASK (7 << TYPE_SHIFT) |
80 | #define TYPE2_SHIFT 3 | 80 | #define TYPE2_SHIFT 3 |
@@ -328,7 +328,7 @@ static int __init twl4030_configure_resource(struct twl4030_resconfig *rconfig) | |||
328 | 328 | ||
329 | /* Set resource group */ | 329 | /* Set resource group */ |
330 | err = twl4030_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &grp, | 330 | err = twl4030_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &grp, |
331 | rconfig_addr + DEVGROUP_OFFSET); | 331 | rconfig_addr + DEV_GRP_OFFSET); |
332 | if (err) { | 332 | if (err) { |
333 | pr_err("TWL4030 Resource %d group could not be read\n", | 333 | pr_err("TWL4030 Resource %d group could not be read\n", |
334 | rconfig->resource); | 334 | rconfig->resource); |
@@ -336,10 +336,10 @@ static int __init twl4030_configure_resource(struct twl4030_resconfig *rconfig) | |||
336 | } | 336 | } |
337 | 337 | ||
338 | if (rconfig->devgroup >= 0) { | 338 | if (rconfig->devgroup >= 0) { |
339 | grp &= ~DEVGROUP_MASK; | 339 | grp &= ~DEV_GRP_MASK; |
340 | grp |= rconfig->devgroup << DEVGROUP_SHIFT; | 340 | grp |= rconfig->devgroup << DEV_GRP_SHIFT; |
341 | err = twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, | 341 | err = twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, |
342 | grp, rconfig_addr + DEVGROUP_OFFSET); | 342 | grp, rconfig_addr + DEV_GRP_OFFSET); |
343 | if (err < 0) { | 343 | if (err < 0) { |
344 | pr_err("TWL4030 failed to program devgroup\n"); | 344 | pr_err("TWL4030 failed to program devgroup\n"); |
345 | return err; | 345 | return err; |