staging: mfd: hi6421-spmi-pmic: cleanup the code

There are several small cleanups that can be done in order to
make the code more prepared to be upstreamed.

Suggested-by: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/823792ba2f69e613629ab52a33e5728d54e2288b.1597647359.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Mauro Carvalho Chehab
2020-08-17 09:10:41 +02:00
committed by Greg Kroah-Hartman
parent 926648d479
commit 6b94669925
2 changed files with 74 additions and 89 deletions

View File

@@ -36,15 +36,17 @@ struct hi6421_spmi_pmic {
int irq;
int gpio;
unsigned int *irqs;
int irqnum;
int irqarray;
struct hi6421_spmi_irq_mask_info irq_mask_addr;
struct hi6421_spmi_irq_info irq_addr;
int irq_mask_addr;
int irq_addr;
};
u32 hi6421_spmi_pmic_read(struct hi6421_spmi_pmic *pmic, int reg);
void hi6421_spmi_pmic_write(struct hi6421_spmi_pmic *pmic, int reg, u32 val);
void hi6421_spmi_pmic_rmw(struct hi6421_spmi_pmic *pmic, int reg, u32 mask, u32 bits);
int hi6421_spmi_pmic_read(struct hi6421_spmi_pmic *pmic, int reg);
int hi6421_spmi_pmic_write(struct hi6421_spmi_pmic *pmic, int reg, u32 val);
int hi6421_spmi_pmic_rmw(struct hi6421_spmi_pmic *pmic, int reg,
u32 mask, u32 bits);
enum hi6421_spmi_pmic_irq_list {
OTMP = 0,