From patchwork Wed Mar 4 16:14:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 5937891 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 810BA9F36A for ; Wed, 4 Mar 2015 16:20:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AD3B5202E9 for ; Wed, 4 Mar 2015 16:20:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5930F202D1 for ; Wed, 4 Mar 2015 16:20:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933280AbbCDQQe (ORCPT ); Wed, 4 Mar 2015 11:16:34 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:36120 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933268AbbCDQQc (ORCPT ); Wed, 4 Mar 2015 11:16:32 -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 <0NKP00J2Z3VHTVB0@mailout4.samsung.com>; Thu, 05 Mar 2015 01:16:30 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-64-54f72fddab04 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id C5.77.09430.DDF27F45; Thu, 05 Mar 2015 01:16:29 +0900 (KST) Received: from AMDC2362.DIGITAL.local ([106.120.53.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NKP0082A3SJHN70@mmp1.samsung.com>; Thu, 05 Mar 2015 01:16:29 +0900 (KST) From: Jacek Anaszewski To: linux-leds@vger.kernel.org, linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kyungmin.park@samsung.com, pavel@ucw.cz, cooloney@gmail.com, rpurdie@rpsys.net, sakari.ailus@iki.fi, s.nawrocki@samsung.com, Jacek Anaszewski , Chanwoo Choi , Lee Jones Subject: [PATCH/RFC v12 08/19] mfd: max77693: Adjust FLASH_EN_SHIFT and TORCH_EN_SHIFT macros Date: Wed, 04 Mar 2015 17:14:29 +0100 Message-id: <1425485680-8417-9-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1425485680-8417-1-git-send-email-j.anaszewski@samsung.com> References: <1425485680-8417-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrNLMWRmVeSWpSXmKPExsVy+t9jAd27+t9DDHbuNrE4unMik8X1L89Z LeYfOcdq0Xv1OaPF2aY37Bb3vx5ltLi8aw6bxdY36xgtejZsZbW4e+oom8XuXU9ZLQ6/aWe1 OLN/JZsDr8fOWXfZPQ5/XcjicefaHjaPPfN/sHr0bVnF6LFi9Xd2j8+b5ALYo7hsUlJzMstS i/TtErgyWluesxZs46x4PXU6YwPjT/YuRk4OCQETifmLOhghbDGJC/fWs4HYQgKLGCU6mlm7 GLmA7HYmiblbt4E1sAkYSvx88ZoJxBYRsJaYdWg6C0gRs8A2JomD61aygCSEBeIlXr8/AFbE IqAqcfT/bbCpvALuEmd/NgHVcABtU5CYM8kGJMwp4CFx9uZ6JojF7hKHH+5nmcDIu4CRYRWj aGpBckFxUnqukV5xYm5xaV66XnJ+7iZGcJA+k97BuKrB4hCjAAejEg/vgdhvIUKsiWXFlbmH GCU4mJVEeJ+zfQ8R4k1JrKxKLcqPLyrNSS0+xCjNwaIkzqtk3xYiJJCeWJKanZpakFoEk2Xi 4JRqYFy3eunM0F8vz1yt3b/R5KHJGY7js3QnCrMnVByozPN8KlES/G7RlEN/9Hy+rvjgmbz3 yMlyX52m3Ntfjs2ccTM6e/6kEokHE3oOG3Ysk3weuXlO9sGNFXOFg93tPV7ekzQPZ9K/905F fNEOee+cSAWdmRcnSpxm8pzM/rpXdBpb4E3lefFFYS5KLMUZiYZazEXFiQB0a6gLTgIAAA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Previous definitions were compatible with one of the previous RFC versions of leds-max77693.c driver, which was not merged. Signed-off-by: Jacek Anaszewski Acked-by: Kyungmin Park Cc: Chanwoo Choi Cc: Lee Jones --- 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 8770ce1..51633ea 100644 --- a/include/linux/mfd/max77693-private.h +++ b/include/linux/mfd/max77693-private.h @@ -114,8 +114,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