From patchwork Thu Nov 9 10:47:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 13450919 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6194DC4167D for ; Thu, 9 Nov 2023 10:48:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:References:MIME-Version:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3hQd5vJv85Qc1Wp50Tm1S6NELlPzW+bZaort7sPNUD0=; b=Rb6L1lFceieif3 hgysIiNHBX6IiZhlH9Z4YtRPc/uGEnOjIauy5rQxgHb3MIWYGIevpFSJgHM65fTgHuENXLPl2FRlG Rr2gHGniMr+IKC6h2lJ8MLjaO9cCtxKGHokNa9BwHCQuBuoimiHmZdgdWMF1o81B5JfeBQX1ToWbH JfoIpCq9P9yPmOrZRa6ME6YoLYDM4ayQ2bApNmCz+RUIpCehXUasYxq9XYzew2FV6PXhbBN1six+1 ojd5aPqtsnmAN0J+AOwksvTUwO4Yr44825KWwQDybNe2ZpVPq/0lATlOci3HdyqqJEIH9iah9XALh ikm6oRApUa6knMgfu30Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r12a1-005yta-1w; Thu, 09 Nov 2023 10:48:09 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r12Zz-005ys7-04 for linux-arm-kernel@lists.infradead.org; Thu, 09 Nov 2023 10:48:08 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20231109104800euoutp015fb10f1a591e986ec462b32237f17092~V7rFoORtv1650616506euoutp01K for ; Thu, 9 Nov 2023 10:48:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20231109104800euoutp015fb10f1a591e986ec462b32237f17092~V7rFoORtv1650616506euoutp01K DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1699526880; bh=QcnjUhE7gQh9uk1LcSTbnLaNbz1wrxJZ4+wU5MZqD8g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ExkYYcDYvuHdp6Aad51IPovmv4L2u1Akmb2HkMgnPCqvXEr9oXduarSm6NrTMxmnw WtdiTN7lwVjYYu2nK7plWcqDH6GQsMfYZjO06g3nmxDteJJrs/lvlhIeGmu/rmt/+W BCUc8gtvxnFpWkBco+05qtWw/L5FV4xx9QpGPFvU= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20231109104759eucas1p282a28328a01f006406aa886cea0a1a64~V7rFVxEFM2949229492eucas1p2A; Thu, 9 Nov 2023 10:47:59 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 1D.5C.52736.FD8BC456; Thu, 9 Nov 2023 10:47:59 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20231109104759eucas1p1fc7343ea2b113abd18397833d70d6835~V7rFASj-y0650306503eucas1p1l; Thu, 9 Nov 2023 10:47:59 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20231109104759eusmtrp2b1027aedbee6ab30b51ab2f2965689b2~V7rE-ekS82298322983eusmtrp22; Thu, 9 Nov 2023 10:47:59 +0000 (GMT) X-AuditID: cbfec7f5-ba1ff7000000ce00-1e-654cb8df7e7f Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 78.13.10549.FD8BC456; Thu, 9 Nov 2023 10:47:59 +0000 (GMT) Received: from AMDC4653.digital.local (unknown [106.120.51.32]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20231109104758eusmtip2560d51f8a9c5f8edb255037d50d620b8~V7rEbZZIu1346813468eusmtip2k; Thu, 9 Nov 2023 10:47:58 +0000 (GMT) From: Marek Szyprowski To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Marek Szyprowski , Krzysztof Kozlowski , Alim Akhtar , Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Subject: [PATCH 2/2] pwm: Clarify PWMF_* enums definition Date: Thu, 9 Nov 2023 11:47:48 +0100 Message-Id: <20231109104748.2746839-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231109104748.2746839-1-m.szyprowski@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIKsWRmVeSWpSXmKPExsWy7djPc7r3d/ikGvxZp2fxYN42Nou9r7ey W2x6fI3V4vKuOWwWd++uYrSYcX4fk8XaI3fZLX7umsdicXviZEYHTo+ds+6ye9y5tofNY/OS eo/+vwYefVtWMXp83iQXwBbFZZOSmpNZllqkb5fAlTFjVj9TwQO2imf3n7A2MG5l7WLk5JAQ MJG4d7SDpYuRi0NIYAWjRMvNF8w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b5ILYIvSsynKLy1JVcjILy6xVYo2tDDSM7S00DMysdQzNDaPtTIyVdK3 s0lJzcksSy3St0vQy5gxq5+p4AFbxbP7T1gbGLeydjFyckgImEhs+nOHvYuRi0NIYCmjxO+Z x9ggEjISJ6c1QBUJS/y51sUGUfSJUeJvy0VmkASbgKFE11uIhIhAF1D3sbWMIA6zQCuTRMOJ VSwgVcIClhITjkB0sAioSsya3w22glfAXmLBjktQ6+Ql9h88C1bDKeAgcbXlFdBqDqB19hJ9 u3MhygUlTs58AjaSGai8eets5gmMArOQpGYhSS1gZFrFKJJaWpybnltsqFecmFtcmpeul5yf u4kRGDHbjv3cvINx3quPeocYmTgYDzFKcDArifBeMPFJFeJNSaysSi3Kjy8qzUktPsRoCnT2 RGYp0eR8YMzmlcQbmhmYGpqYWRqYWpoZK4nzehZ0JAoJpCeWpGanphakFsH0MXFwSjUweRUJ Hzr1+MDJxMtbL7j1717zSPxsf5GxglLepbKQrdF32INda3W4eftc9oRfM5L5k15i3h1zYc7W ufYT5jXzmPr93Xp/VbLh2n8XJ2iVfksvP8Rj/X49g/Si7d7dic23dvJGWuRZRKzq9Oe12WrT 7GVjYRXLszTM51jsiQO+NzL1bGU2OKfPsLGOeiOa/uHK/Uqv2HWbTmV/YsgyvGNm8TbaTehW 1+F5G7WW5Zg0XPqct9n9VJHW4tjJcWuTbFbnq7NO1WFJ2y2eE15y6vKtHTN/i51apvX5xcGz J3sNTKOervmz6Vv1Jq9nDI3ZsyadWX43dI71QgH77QyaZ8uudgs7MWznOnhX7/Ka/IPTlViK MxINtZiLihMB4i5jEyEDAAA= X-CMS-MailID: 20231109104759eucas1p1fc7343ea2b113abd18397833d70d6835 X-Msg-Generator: CA X-RootMTR: 20231109104759eucas1p1fc7343ea2b113abd18397833d70d6835 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20231109104759eucas1p1fc7343ea2b113abd18397833d70d6835 References: <20231109104748.2746839-1-m.szyprowski@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231109_024807_325007_3DB04296 X-CRM114-Status: GOOD ( 13.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org PWMF_* enums are defined as flag values (like 1 << n), but then in the code they are used as bit numbers via set/test/clear_bit() macros. Change their values to sequential numbers to clearly show that they are bit numbers, not the flag values. Signed-off-by: Marek Szyprowski Reviewed-by: Sam Protsenko --- include/linux/pwm.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/linux/pwm.h b/include/linux/pwm.h index e3b437587b32..95c895c63cf6 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h @@ -40,9 +40,12 @@ struct pwm_args { enum pwm_polarity polarity; }; -enum { - PWMF_REQUESTED = 1 << 0, - PWMF_EXPORTED = 1 << 1, +/** + * enum pwm_flags_bits - status bits for pwm->flags entry + */ +enum pwm_flags_bits { + PWMF_REQUESTED = 0, + PWMF_EXPORTED = 1, }; /*