From patchwork Wed Feb 18 16:20:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 5845111 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 905CCBF440 for ; Wed, 18 Feb 2015 16:24:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D376620256 for ; Wed, 18 Feb 2015 16:23:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BAC1820253 for ; Wed, 18 Feb 2015 16:23:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752580AbbBRQX4 (ORCPT ); Wed, 18 Feb 2015 11:23:56 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:58804 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751925AbbBRQXz (ORCPT ); Wed, 18 Feb 2015 11:23:55 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NJZ000KN6VTBW60@mailout3.samsung.com>; Thu, 19 Feb 2015 01:23:53 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-f7-54e4bc997431 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 74.E3.09430.99CB4E45; Thu, 19 Feb 2015 01:23:53 +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:23:53 +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 07/20] mfd: max77693: add TORCH_IOUT_MASK macro Date: Wed, 18 Feb 2015 17:20:28 +0100 Message-id: <1424276441-3969-8-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+t9jAd2Ze56EGBz7x29xdOdEJovrX56z Wsw/co7Vovfqc0aLs01v2C3ufz3KaLH1zTpGi54NW1kt7p46ymaxe9dTVovDb9pZLc7sX8nm wOOxc9Zddo/DXxeyeNy5tofNY8/8H6wefVtWMXqsWP2d3ePzJrkA9igum5TUnMyy1CJ9uwSu jLML1jIWnGSveP65gbmBcRdbFyMnh4SAicSx1xegbDGJC/fWA9lcHEICixglLky5CuW0M0k8 mtrHAlLFJmAo8fPFayYQW0QgUuLd0UvMIEXMAr8YJXqPzmAHSQgLuEv8ejaFEcRmEVCVOPz0 JtgKXqB455r1QHEOoHUKEnMm2YCYnAIeEheee4BUCAFVTL/5jnUCI+8CRoZVjKKpBckFxUnp uUZ6xYm5xaV56XrJ+bmbGMGh+Ux6B+OqBotDjAIcjEo8vA2/H4cIsSaWFVfmHmKU4GBWEuHN XfkkRIg3JbGyKrUoP76oNCe1+BCjNAeLkjivkn1biJBAemJJanZqakFqEUyWiYNTqoExT0+M j+HY2yOn/D36E+WWRzc8DPi49ISt+plLgaXnJ1UXBwQuLrhXZcIvuvDBN3vrkmO3rLZ/u7NQ oMHz3O6Mgrx3DdUPLhQsZJvyYHfv/QSeqAenZYIvXFXvbd1XI9orkb7nEWP2pbzsj4m8DTcf M2tv+flMebuy9Ha+Wb0es99YXX1ucuSNEktxRqKhFnNRcSIAqqbhLEkCAAA= 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 Add a macro for obtaining the mask of ITORCH register bit fields related either to FLED1 or FLED2 current output. The expected arguments are TORCH_IOUT1_SHIFT or TORCH_IOUT2_SHIFT. Signed-off-by: Jacek Anaszewski Acked-by: Kyungmin Park Cc: Chanwoo Choi Cc: Lee Jones --- include/linux/mfd/max77693-private.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h index 955dd99..8770ce1 100644 --- a/include/linux/mfd/max77693-private.h +++ b/include/linux/mfd/max77693-private.h @@ -87,6 +87,7 @@ enum max77693_pmic_reg { /* MAX77693 ITORCH register */ #define TORCH_IOUT1_SHIFT 0 #define TORCH_IOUT2_SHIFT 4 +#define TORCH_IOUT_MASK(x) (0xf << (x)) #define TORCH_IOUT_MIN 15625 #define TORCH_IOUT_MAX 250000 #define TORCH_IOUT_STEP 15625