Skip to content

Commit

Permalink
mfd: bd70528: Staticize bit value definitions
Browse files Browse the repository at this point in the history
Make bit definitions static to reduce the scope.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
Matti Vaittinen authored and Lee Jones committed Nov 11, 2019
1 parent 6b5c350 commit cfca8bb
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions drivers/mfd/rohm-bd70528.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,14 @@ static struct regmap_config bd70528_regmap = {
* register.
*/

/* bit [0] - Shutdown register */
unsigned int bit0_offsets[] = {0}; /* Shutdown register */
unsigned int bit1_offsets[] = {1}; /* Power failure register */
unsigned int bit2_offsets[] = {2}; /* VR FAULT register */
unsigned int bit3_offsets[] = {3}; /* PMU register interrupts */
unsigned int bit4_offsets[] = {4, 5}; /* Charger 1 and Charger 2 registers */
unsigned int bit5_offsets[] = {6}; /* RTC register */
unsigned int bit6_offsets[] = {7}; /* GPIO register */
unsigned int bit7_offsets[] = {8}; /* Invalid operation register */
static unsigned int bit0_offsets[] = {0}; /* Shutdown */
static unsigned int bit1_offsets[] = {1}; /* Power failure */
static unsigned int bit2_offsets[] = {2}; /* VR FAULT */
static unsigned int bit3_offsets[] = {3}; /* PMU interrupts */
static unsigned int bit4_offsets[] = {4, 5}; /* Charger 1 and Charger 2 */
static unsigned int bit5_offsets[] = {6}; /* RTC */
static unsigned int bit6_offsets[] = {7}; /* GPIO */
static unsigned int bit7_offsets[] = {8}; /* Invalid operation */

static struct regmap_irq_sub_irq_map bd70528_sub_irq_offsets[] = {
REGMAP_IRQ_MAIN_REG_OFFSET(bit0_offsets),
Expand Down

0 comments on commit cfca8bb

Please sign in to comment.