Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751271AbdH2He5 (ORCPT ); Tue, 29 Aug 2017 03:34:57 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:14639 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750796AbdH2Hew (ORCPT ); Tue, 29 Aug 2017 03:34:52 -0400 X-AuditID: b6c32a46-f790d6d000003bf5-1e-59a51918119e Date: Tue, 29 Aug 2017 16:34:53 +0900 From: Andi Shyti To: Chen Zhong Cc: Dmitry Torokhov , Rob Herring , Mark Rutland , Matthias Brugger , Lee Jones , Eddie Huang , Alessandro Zummo , Alexandre Belloni , Javier Martinez Canillas , Linus Walleij , Jaechul Lee , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org Subject: Re: [PATCH v3 4/5] input: Add MediaTek PMIC keys support Message-id: <20170829073453.GB4469@gangnam> MIME-version: 1.0 Content-type: text/plain; charset="us-ascii" Content-disposition: inline In-reply-to: <1503642753-12385-5-git-send-email-chen.zhong@mediatek.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrIJsWRmVeSWpSXmKPExsWy7bCmha6E5NJIg/8TbSyWXLzKbtFxbTGT xfGeT4wW84+cY7U4vOgFo8W1Rx0sFm/ermGyeLu/m9ni/tejjBZT/ixnstj0+Bqrxc1P31gt Lu+aw2Zxufkio8Wx1VfYLJZev8hk0dRibNG69wi7g5DHmnlrGD2ebLrI6LFz1l12j02rOtk8 7lzbw+axeUm9R8vJ/SweW/qB4n1bVjF6TJ/3k8nj8ya5AO6oVJuM1MSU1CKF1Lzk/JTMvHRb Je/geOd4UzMDQ11DSwtzJYW8xNxUWyUXnwBdt8wcoM+UFMoSc0qBQgGJxcVK+nY2RfmlJakK GfnFJbZK0YaGRnqGBu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85J6j5aT+1k8tvQDxfu2rGL0mD7vJ5PH501yAdxRXDYpqTmZZalF+nYJXBmT31xh LzjCUTFn3gHmBsazbF2MnBwSAiYSM7ZNYu1i5OIQEljHKNF7/SQLhPOSUWJq01awKhYBVYmO d7NZQWw2AU2Jpts/gOIcHCICGhIXegtBwswCi1klJrx1AbGFBRwlXnw9zwRi8wpoSyz6+wdq 5k1GiSXfF7BBJAQlfky+xwLRrCWxfudxJghbWuLR3xnsIDangIfErgNXwepFBZQl5u1bxTaB kX8WkvZZSNpnIWlfwMi8ilEytaA4Nz232KjAKC+1XK84Mbe4NC9dLzk/dxMjMPq2Hdbq38H4 eEn8IUYBDkYlHt4V1ksihVgTy4orcw8xSnAwK4nwBrMvjRTiTUmsrEotyo8vKs1JLT7EKM3B oiTOm9k3I1JIID2xJDU7NbUgtQgmy8TBKdXAyDTjanDK3CBBV8XGF3cLjorGMl18HGr18si/ HbkJmiW7FLWOX2nW/RAdvf/0SlVp923vPnNELS5bWv/fufn8DW65PV8t3c55fec78n6v8lOm 3i3dqidex//PrLtrPpHBwXWpKdOf9929onbz/pVGMErU2xow9fz/duT8/3UHc2rOq2zXn+Nw X4mlOCPRUIu5qDgRAGr/rKi6AgAA X-CMS-MailID: 20170829073448epcas2p26dd17638780d826bf2d45c190203a596 X-Msg-Generator: CA X-Sender-IP: 182.195.42.143 X-Local-Sender: =?UTF-8?B?7JWI65SUG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLzthLAp?= =?UTF-8?B?G+yCvOyEseyghOyekBtTZW5pb3IgRW5naW5lZXI=?= X-Global-Sender: =?UTF-8?B?QW5kaSBTaHl0aRtUaXplbiBQbGF0Zm9ybSBMYWIuG1NhbXN1?= =?UTF-8?B?bmcgRWxlY3Ryb25pY3MbU2VuaW9yIEVuZ2luZWVy?= X-Sender-Code: =?UTF-8?B?QzEwG1RFTEUbQzEwVjgxMTE=?= CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20170825063247epcas5p1df2f4440010dd55dada66e8764d18e50 X-RootMTR: 20170825063247epcas5p1df2f4440010dd55dada66e8764d18e50 References: <1503642753-12385-1-git-send-email-chen.zhong@mediatek.com> <1503642753-12385-5-git-send-email-chen.zhong@mediatek.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1044 Lines: 48 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