From patchwork Wed Feb 18 16:20: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: 5845121 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5D31BBF440 for ; Wed, 18 Feb 2015 16:24:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 709B220256 for ; Wed, 18 Feb 2015 16:24:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B1FA20253 for ; Wed, 18 Feb 2015 16:24:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752619AbbBRQYY (ORCPT ); Wed, 18 Feb 2015 11:24:24 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:62526 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752330AbbBRQYW (ORCPT ); Wed, 18 Feb 2015 11:24:22 -0500 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NJZ00H6H6WL9440@mailout4.samsung.com>; Thu, 19 Feb 2015 01:24:21 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-bd-54e4bcb5abac Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id C9.69.20081.5BCB4E45; Thu, 19 Feb 2015 01:24:21 +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 <0NJZ003WS6QJDJ20@mmp1.samsung.com>; Thu, 19 Feb 2015 01:24:21 +0900 (KST) From: Jacek Anaszewski To: linux-leds@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: 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 v11 08/20] mfd: max77693: Adjust FLASH_EN_SHIFT and TORCH_EN_SHIFT macros Date: Wed, 18 Feb 2015 17:20:29 +0100 Message-id: <1424276441-3969-9-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1424276441-3969-1-git-send-email-j.anaszewski@samsung.com> References: <1424276441-3969-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGLMWRmVeSWpSXmKPExsVy+t9jAd2te56EGLycKG9xdOdEJovrX56z Wsw/co7Vovfqc0aLs01v2C3ufz3KaLH1zTpGi54NW1kt7p46ymaxe9dTVovDb9pZLc7sX8nm wOOxc9Zddo/DXxeyeNy5tofNY8/8H6wefVtWMXqsWP2d3ePzJrkA9igum5TUnMyy1CJ9uwSu jNaW56wF2zgrXk+dztjA+JO9i5GTQ0LAROL3924WCFtM4sK99WxdjFwcQgKLGCUWXLjACuG0 M0l8nXUfrINNwFDi54vXTCC2iECkxLujl5hBipgFfjFK9B6dAVYkLBAvceHFTzYQm0VAVWL6 /EawBl4Bd4lXZzYCNXAArVOQmDPJBsTkFPCQuPDcA6RCCKhi+s13rBMYeRcwMqxiFE0tSC4o TkrPNdQrTswtLs1L10vOz93ECA7NZ1I7GFc2WBxiFOBgVOLhbfj9OESINbGsuDL3EKMEB7OS CG/uyichQrwpiZVVqUX58UWlOanFhxilOViUxHmV7NtChATSE0tSs1NTC1KLYLJMHJxSDYxT P9+qfHKVtVBEzXrvvYhT8bePP9I8osuTI33gysuJ05uutFmISEdvqecoPfFSK1ng0JQKHpvV S1gt0jht9sSabD1qvVamzrZRe1u7gd7b0j3PQza92pl4YJeGw07zvN+fvlZKforu7rDyDZmS KLvvYuvLs2Km2T0BnQFvW1YyGB48saS4MFGJpTgj0VCLuag4EQCHefK6SQIAAA== 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