From patchwork Wed Mar 4 16:14: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: 5937901 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 5AAB99F36A for ; Wed, 4 Mar 2015 16:21:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 926D9202D1 for ; Wed, 4 Mar 2015 16:21:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AC95B202B4 for ; Wed, 4 Mar 2015 16:21:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933252AbbCDQQa (ORCPT ); Wed, 4 Mar 2015 11:16:30 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:12599 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933219AbbCDQQ0 (ORCPT ); Wed, 4 Mar 2015 11:16:26 -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 <0NKP00KQT3VCSDB0@mailout3.samsung.com>; Thu, 05 Mar 2015 01:16:25 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-5f-54f72fd8eb33 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 94.77.09430.8DF27F45; Thu, 05 Mar 2015 01:16:24 +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:24 +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 07/19] mfd: max77693: add TORCH_IOUT_MASK macro Date: Wed, 04 Mar 2015 17:14:28 +0100 Message-id: <1425485680-8417-8-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+t9jAd0b+t9DDM4dtbI4unMik8X1L89Z LeYfOcdq0Xv1OaPF2aY37Bb3vx5ltLi8aw6bxdY36xgtejZsZbW4e+oom8XuXU9ZLQ6/aWe1 OLN/JZsDr8fOWXfZPQ5/XcjicefaHjaPPfN/sHr0bVnF6LFi9Xd2j8+b5ALYo7hsUlJzMstS i/TtErgyzi5Yy1hwkr3i+ecG5gbGXWxdjBwcEgImEh9/hnYxcgKZYhIX7q0HCnNxCAksYpRY t/I4lNPOJLF2wwJGkCo2AUOJny9eM4HYIgLWErMOTWcBKWIW2MYkcXDdShaQhLCAu8SWle3M IDaLgKrE4YfX2UFsXqD44VkNzBCbFSTmTLIBCXMKeEicvbkebKYQSMnD/SwTGHkXMDKsYhRN LUguKE5KzzXSK07MLS7NS9dLzs/dxAgO0mfSOxhXNVgcYhTgYFTi4T0Q+y1EiDWxrLgy9xCj BAezkgjvc7bvIUK8KYmVValF+fFFpTmpxYcYpTlYlMR5lezbQoQE0hNLUrNTUwtSi2CyTByc Ug2MGTuSPr0r2fnhie+ZafOqFl2S//+Aa7pz5tb7ercNpq5Pe7unLuXDr8l//AUfixiu11au 49OelbvCUCD3zZdE8/saUx88nMByoelVxBpxT8d3nb+t450q+Zg9Wxrj2MTTmmW+52528BDw bfsb7sr5UK1sc0polcBjuy2BE5Xc592Ny7ov9cFeiaU4I9FQi7moOBEAOX4s2U4CAAA= 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