Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1722196 > unrolled thread
| Started by | Andi Shyti <andi.shyti@samsung.com> |
|---|---|
| First post | 2017-08-29 09:40 +0200 |
| Last post | 2017-08-29 09:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v3 4/5] input: Add MediaTek PMIC keys support Andi Shyti <andi.shyti@samsung.com> - 2017-08-29 09:40 +0200
Re: [PATCH v3 4/5] input: Add MediaTek PMIC keys support Chen Zhong <chen.zhong@mediatek.com> - 2017-08-29 09:50 +0200
| From | Andi Shyti <andi.shyti@samsung.com> |
|---|---|
| Date | 2017-08-29 09:40 +0200 |
| Subject | Re: [PATCH v3 4/5] input: Add MediaTek PMIC keys support |
| Message-ID | <ujJhT-89K-7@gated-at.bofh.it> |
Hi Chen,
what I would ask you is to be consistent with the naming, if your
driver is called mtk-pmic, then all your functions and global
variables should be named accordingly as mtk_pmic or MTK_PMIC.
Please check in between the lines for real examples:
> +#define PWRKEY_RST_EN_MASK 0x1
> +#define PWRKEY_RST_EN_SHIFT 6
> +#define HOMEKEY_RST_EN_MASK 0x1
> +#define HOMEKEY_RST_EN_SHIFT 5
> +#define RST_DU_MASK 0x3
> +#define RST_DU_SHIFT 8
> +
> +#define PMIC_PWRKEY_INDEX 0
> +#define PMIC_HOMEKEY_INDEX 1
> +#define PMIC_MAX_KEY_COUNT 2
#define MTK_PMIC_*
> +struct pmic_keys_regs {
struct mtk_pmic_keys_regs
> + u32 deb_reg;
> + u32 deb_mask;
> + u32 intsel_reg;
> + u32 intsel_mask;
> +};
> +
> +#define PMIC_KEYS_REGS(_deb_reg, _deb_mask, _intsel_reg, _intsel_mask) \
MTK_PMIC_KEYS_REGS
> +{ \
> + .deb_reg = _deb_reg, \
> + .deb_mask = _deb_mask, \
> + .intsel_reg = _intsel_reg, \
> + .intsel_mask = _intsel_mask, \
> +}
> +
> +struct pmic_regs {
mtk_pmic_regs
and so on... you got the point.
Andi
[toc] | [next] | [standalone]
| From | Chen Zhong <chen.zhong@mediatek.com> |
|---|---|
| Date | 2017-08-29 09:50 +0200 |
| Message-ID | <ujJrz-8de-1@gated-at.bofh.it> |
| In reply to | #1722196 |
Hi Andi,
Sorry for that, i deleted some prefix since the namings will be such
long. If this should be consistent, I'll check and modify them in the
next version.
Thank you.
On Tue, 2017-08-29 at 16:34 +0900, Andi Shyti wrote:
> Hi Chen,
>
> what I would ask you is to be consistent with the naming, if your
> driver is called mtk-pmic, then all your functions and global
> variables should be named accordingly as mtk_pmic or MTK_PMIC.
> Please check in between the lines for real examples:
>
> > +#define PWRKEY_RST_EN_MASK 0x1
> > +#define PWRKEY_RST_EN_SHIFT 6
> > +#define HOMEKEY_RST_EN_MASK 0x1
> > +#define HOMEKEY_RST_EN_SHIFT 5
> > +#define RST_DU_MASK 0x3
> > +#define RST_DU_SHIFT 8
> > +
> > +#define PMIC_PWRKEY_INDEX 0
> > +#define PMIC_HOMEKEY_INDEX 1
> > +#define PMIC_MAX_KEY_COUNT 2
>
> #define MTK_PMIC_*
>
> > +struct pmic_keys_regs {
>
> struct mtk_pmic_keys_regs
>
> > + u32 deb_reg;
> > + u32 deb_mask;
> > + u32 intsel_reg;
> > + u32 intsel_mask;
> > +};
> > +
> > +#define PMIC_KEYS_REGS(_deb_reg, _deb_mask, _intsel_reg, _intsel_mask) \
>
> MTK_PMIC_KEYS_REGS
>
> > +{ \
> > + .deb_reg = _deb_reg, \
> > + .deb_mask = _deb_mask, \
> > + .intsel_reg = _intsel_reg, \
> > + .intsel_mask = _intsel_mask, \
> > +}
> > +
> > +struct pmic_regs {
>
> mtk_pmic_regs
>
> and so on... you got the point.
>
> Andi
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web