Message ID | 1420816989-1808-8-git-send-email-j.anaszewski@samsung.com (mailing list archive) |
---|---|
State | RFC, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1Y9bZM-0003UB-Al; Fri, 09 Jan 2015 16:33:48 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-8) with esmtp id 1Y9bZK-0002qU-k4; Fri, 09 Jan 2015 16:33:48 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932715AbbAIPYJ (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Fri, 9 Jan 2015 10:24:09 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:26711 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932668AbbAIPYF (ORCPT <rfc822; linux-media@vger.kernel.org>); Fri, 9 Jan 2015 10:24:05 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NHX00IXO1G35A90@mailout4.samsung.com>; Sat, 10 Jan 2015 00:24:03 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-54-54aff292b2f7 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id F6.B6.09430.292FFA45; Sat, 10 Jan 2015 00:24:03 +0900 (KST) Received: from AMDC2362.DIGITAL.local ([106.120.53.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NHX003F51EOLH20@mmp2.samsung.com>; Sat, 10 Jan 2015 00:24:02 +0900 (KST) From: Jacek Anaszewski <j.anaszewski@samsung.com> To: linux-leds@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, kyungmin.park@samsung.com, b.zolnierkie@samsung.com, pavel@ucw.cz, cooloney@gmail.com, rpurdie@rpsys.net, sakari.ailus@iki.fi, s.nawrocki@samsung.com, Jacek Anaszewski <j.anaszewski@samsung.com>, Chanwoo Choi <cw00.choi@samsung.com>, Lee Jones <lee.jones@linaro.org> Subject: [PATCH/RFC v10 07/19] mfd: max77693: Adjust FLASH_EN_SHIFT and TORCH_EN_SHIFT macros Date: Fri, 09 Jan 2015 16:22:57 +0100 Message-id: <1420816989-1808-8-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1420816989-1808-1-git-send-email-j.anaszewski@samsung.com> References: <1420816989-1808-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrDLMWRmVeSWpSXmKPExsVy+t9jQd3Jn9aHGNx/xWyxccZ6VoujOycy WVz/8pzVYv6Rc6wWvVefM1qcbXrDbnH/61FGi8u75rBZbH2zjtGiZ8NWVou7p46yWeze9ZTV 4vCbdlaLM/tXsjnweeycdZfd4/DXhSwed67tYfPYM/8Hq0ffllWMHitWf2f3+LxJLoA9issm JTUnsyy1SN8ugSvj0+mtzAU7OCp2PD3O1MDYz97FyMkhIWAisXX9HxYIW0ziwr31bF2MXBxC AtMZJbb0NLBCOO1MEs2/5jOBVLEJGEr8fPEayObgEBGIlrh0rB4kzCywiUli11ddEFtYIF5i 9aedrCA2i4CqxLnG+ywg5bwC7hLNH3JATAkBBYk5k2xATE4BD4mW304gphBQwZurhhMYeRcw MqxiFE0tSC4oTkrPNdIrTswtLs1L10vOz93ECA7TZ9I7GFc1WBxiFOBgVOLh3SC3PkSINbGs uDL3EKMEB7OSCG/DZqAQb0piZVVqUX58UWlOavEhRmkOFiVxXiX7thAhgfTEktTs1NSC1CKY LBMHp1QDI4NtrJBpncaG3LJqo1O1Sx+GVVyXjZ8T4Zu+aMdD7ceGexP+3FNZp7Nrk+38+y4T XuUfn1Uk4KGaEfCh7NBWy3v7t7F2avtvsmIK3fjnXOKEc12tr4//m3zu1H75ImEGPsH2Dy1h 9/9mXBdJSP6cwlIRL3BvCo/kT8PQ828KqzYdXyrcmevrp8RSnJFoqMVcVJwIAKYCpGdPAgAA Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2015.1.9.152425 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1200_1299 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, REFERENCES 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __FRAUD_BADTHINGS 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' |
Commit Message
Jacek Anaszewski
Jan. 9, 2015, 3:22 p.m. UTC
Modify FLASH_EN_SHIFT and TORCH_EN_SHIFT macros to work properly when passed enum max77693_fled values (0 for FLED1 and 1 for FLED2) from leds-max77693 driver. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Chanwoo Choi <cw00.choi@samsung.com> Cc: Lee Jones <lee.jones@linaro.org> --- include/linux/mfd/max77693-private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Fri 2015-01-09 16:22:57, Jacek Anaszewski wrote: > Modify FLASH_EN_SHIFT and TORCH_EN_SHIFT macros to work properly > when passed enum max77693_fled values (0 for FLED1 and 1 for FLED2) > from leds-max77693 driver. > > Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> > Acked-by: Kyungmin Park <kyungmin.park@samsung.com> > Cc: Chanwoo Choi <cw00.choi@samsung.com> > Cc: Lee Jones <lee.jones@linaro.org> Acked-by: Pavel Machek <pavel@ucw.cz>
On Fri, 09 Jan 2015, Jacek Anaszewski wrote: > Modify FLASH_EN_SHIFT and TORCH_EN_SHIFT macros to work properly > when passed enum max77693_fled values (0 for FLED1 and 1 for FLED2) > from leds-max77693 driver. Off-by-one ay? Wasn't the original code tested? > Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> > Acked-by: Kyungmin Park <kyungmin.park@samsung.com> > Cc: Chanwoo Choi <cw00.choi@samsung.com> > Cc: Lee Jones <lee.jones@linaro.org> > --- > include/linux/mfd/max77693-private.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h > index 08dae01..01799a9 100644 > --- a/include/linux/mfd/max77693-private.h > +++ b/include/linux/mfd/max77693-private.h > @@ -113,8 +113,8 @@ enum max77693_pmic_reg { > #define FLASH_EN_FLASH 0x1 > #define FLASH_EN_TORCH 0x2 > #define FLASH_EN_ON 0x3 > -#define FLASH_EN_SHIFT(x) (6 - ((x) - 1) * 2) > -#define TORCH_EN_SHIFT(x) (2 - ((x) - 1) * 2) > +#define FLASH_EN_SHIFT(x) (6 - (x) * 2) > +#define TORCH_EN_SHIFT(x) (2 - (x) * 2) > > /* MAX77693 MAX_FLASH1 register */ > #define MAX_FLASH1_MAX_FL_EN 0x80
On 01/20/2015 12:17 PM, Lee Jones wrote: > On Fri, 09 Jan 2015, Jacek Anaszewski wrote: > >> Modify FLASH_EN_SHIFT and TORCH_EN_SHIFT macros to work properly >> when passed enum max77693_fled values (0 for FLED1 and 1 for FLED2) >> from leds-max77693 driver. > > Off-by-one ay? Wasn't the original code tested? The driver using these macros is a part of LED / flash API integration patch series, which still undergoes modifications and it hasn't reached its final state yet, as there are many things to discuss. >> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> >> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> >> Cc: Chanwoo Choi <cw00.choi@samsung.com> >> Cc: Lee Jones <lee.jones@linaro.org> >> --- >> include/linux/mfd/max77693-private.h | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h >> index 08dae01..01799a9 100644 >> --- a/include/linux/mfd/max77693-private.h >> +++ b/include/linux/mfd/max77693-private.h >> @@ -113,8 +113,8 @@ enum max77693_pmic_reg { >> #define FLASH_EN_FLASH 0x1 >> #define FLASH_EN_TORCH 0x2 >> #define FLASH_EN_ON 0x3 >> -#define FLASH_EN_SHIFT(x) (6 - ((x) - 1) * 2) >> -#define TORCH_EN_SHIFT(x) (2 - ((x) - 1) * 2) >> +#define FLASH_EN_SHIFT(x) (6 - (x) * 2) >> +#define TORCH_EN_SHIFT(x) (2 - (x) * 2) >> >> /* MAX77693 MAX_FLASH1 register */ >> #define MAX_FLASH1_MAX_FL_EN 0x80 >
On 01/20/2015 02:01 PM, Jacek Anaszewski wrote: > On 01/20/2015 12:17 PM, Lee Jones wrote: >> On Fri, 09 Jan 2015, Jacek Anaszewski wrote: >> >>> Modify FLASH_EN_SHIFT and TORCH_EN_SHIFT macros to work properly >>> when passed enum max77693_fled values (0 for FLED1 and 1 for FLED2) >>> from leds-max77693 driver. >> >> Off-by-one ay? Wasn't the original code tested? > > The driver using these macros is a part of LED / flash API integration > patch series, which still undergoes modifications and it hasn't > reached its final state yet, as there are many things to discuss. To be more precise: the original code had been tested and was working properly with the header that is in the mainline. Nonetheless, because of the modifications in the driver that was requested during code review, it turned out that it would be more convenient to redefine the macros. I'd opt for just agreeing about the mfd related patches and merge them no sooner than the leds-max77693 driver is merged.
On Tue, 20 Jan 2015, Jacek Anaszewski wrote: > On 01/20/2015 02:01 PM, Jacek Anaszewski wrote: > >On 01/20/2015 12:17 PM, Lee Jones wrote: > >>On Fri, 09 Jan 2015, Jacek Anaszewski wrote: > >> > >>>Modify FLASH_EN_SHIFT and TORCH_EN_SHIFT macros to work properly > >>>when passed enum max77693_fled values (0 for FLED1 and 1 for FLED2) > >>>from leds-max77693 driver. > >> > >>Off-by-one ay? Wasn't the original code tested? > > > >The driver using these macros is a part of LED / flash API integration > >patch series, which still undergoes modifications and it hasn't > >reached its final state yet, as there are many things to discuss. > > To be more precise: the original code had been tested and was working > properly with the header that is in the mainline. Nonetheless, because > of the modifications in the driver that was requested during code > review, it turned out that it would be more convenient to redefine the > macros. > > I'd opt for just agreeing about the mfd related patches and merge > them no sooner than the leds-max77693 driver is merged. The only way we can guarantee this is to have them go in during different merge-windows, unless of course they go in via the same tree.
On Tue 2015-01-20 15:40:29, Lee Jones wrote: > On Tue, 20 Jan 2015, Jacek Anaszewski wrote: > > > On 01/20/2015 02:01 PM, Jacek Anaszewski wrote: > > >On 01/20/2015 12:17 PM, Lee Jones wrote: > > >>On Fri, 09 Jan 2015, Jacek Anaszewski wrote: > > >> > > >>>Modify FLASH_EN_SHIFT and TORCH_EN_SHIFT macros to work properly > > >>>when passed enum max77693_fled values (0 for FLED1 and 1 for FLED2) > > >>>from leds-max77693 driver. > > >> > > >>Off-by-one ay? Wasn't the original code tested? > > > > > >The driver using these macros is a part of LED / flash API integration > > >patch series, which still undergoes modifications and it hasn't > > >reached its final state yet, as there are many things to discuss. > > > > To be more precise: the original code had been tested and was working > > properly with the header that is in the mainline. Nonetheless, because > > of the modifications in the driver that was requested during code > > review, it turned out that it would be more convenient to redefine the > > macros. > > > > I'd opt for just agreeing about the mfd related patches and merge > > them no sooner than the leds-max77693 driver is merged. > > The only way we can guarantee this is to have them go in during > different merge-windows, unless of course they go in via the same tree. Umm. Maintainers should be able to coordinate that. Delaying patch for one major release seems rather cruel. Perhaps one maintainer should ack the patch and the second one should merge it... Pavel
On Tue, 20 Jan 2015, Pavel Machek wrote: > On Tue 2015-01-20 15:40:29, Lee Jones wrote: > > On Tue, 20 Jan 2015, Jacek Anaszewski wrote: > > > > > On 01/20/2015 02:01 PM, Jacek Anaszewski wrote: > > > >On 01/20/2015 12:17 PM, Lee Jones wrote: > > > >>On Fri, 09 Jan 2015, Jacek Anaszewski wrote: > > > >> > > > >>>Modify FLASH_EN_SHIFT and TORCH_EN_SHIFT macros to work properly > > > >>>when passed enum max77693_fled values (0 for FLED1 and 1 for FLED2) > > > >>>from leds-max77693 driver. > > > >> > > > >>Off-by-one ay? Wasn't the original code tested? > > > > > > > >The driver using these macros is a part of LED / flash API integration > > > >patch series, which still undergoes modifications and it hasn't > > > >reached its final state yet, as there are many things to discuss. > > > > > > To be more precise: the original code had been tested and was working > > > properly with the header that is in the mainline. Nonetheless, because > > > of the modifications in the driver that was requested during code > > > review, it turned out that it would be more convenient to redefine the > > > macros. > > > > > > I'd opt for just agreeing about the mfd related patches and merge > > > them no sooner than the leds-max77693 driver is merged. > > > > The only way we can guarantee this is to have them go in during > > different merge-windows, unless of course they go in via the same tree. > > Umm. Maintainers should be able to coordinate that. Delaying patch for > one major release seems rather cruel. Perhaps one maintainer should > ack the patch and the second one should merge it... Wow, you're just everywhere today. :) Read the part after the comma again.
diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h index 08dae01..01799a9 100644 --- a/include/linux/mfd/max77693-private.h +++ b/include/linux/mfd/max77693-private.h @@ -113,8 +113,8 @@ enum max77693_pmic_reg { #define FLASH_EN_FLASH 0x1 #define FLASH_EN_TORCH 0x2 #define FLASH_EN_ON 0x3 -#define FLASH_EN_SHIFT(x) (6 - ((x) - 1) * 2) -#define TORCH_EN_SHIFT(x) (2 - ((x) - 1) * 2) +#define FLASH_EN_SHIFT(x) (6 - (x) * 2) +#define TORCH_EN_SHIFT(x) (2 - (x) * 2) /* MAX77693 MAX_FLASH1 register */ #define MAX_FLASH1_MAX_FL_EN 0x80