From patchwork Thu Nov 9 10:47:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 13450920 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 9AA4FC4332F for ; Thu, 9 Nov 2023 10:48:40 +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: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:In-Reply-To: List-Owner; bh=FiPYMVRQgv6twGR0maZLL0t5t8GGw+XU6qH5E8ijuj4=; b=2XtyRluGu78H2Z CssKeHIuJ427bP4XsIdmsNsXcVJM5I+vTokRJt7hw280OEiKOv6XXU0JsrqqQSAuhp5ofwEAziBTB +eQotsSGbqFWu6223Fq31k/edthl9Dr9GkzvZWDHuLhn1HvgX42DPiZrc7Cd0t00uPSiq972Pao+M MAcwDYlsBA41d2Kb4VVCVNhacZLjs5Z5j/NfLB5W/1qUQHaMImPqFxwj5GF15v/6iOIv1V+Ick/k5 pVuCiPMa6bFZbuIT0OJdrGqDvc25kRAmCTl8yeut7sUz6wfZ35aMOQUY1ERoA+2RT+ZtP5UQ2nFe6 bXz8MwtwgNqdjyz+da2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r12a2-005ytr-0X; Thu, 09 Nov 2023 10:48:10 +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-005yrv-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 20231109104759euoutp01f225ab7cdc1b234860b9a5f4e5f19629~V7rFDkmFg1650116501euoutp01R for ; Thu, 9 Nov 2023 10:47:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20231109104759euoutp01f225ab7cdc1b234860b9a5f4e5f19629~V7rFDkmFg1650116501euoutp01R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1699526879; bh=ghDtuNm/rprsB94SZ+nrIouWWrb2Q3jHekqjdqhln5s=; h=From:To:Cc:Subject:Date:References:From; b=VI/ADahax0HsXra5ywaFvb9JA1dO3RVHZF+LDTECuHlFTVzKEIeWzi6rKQMFLuDA3 zuDQWvtjY6d3WujN3ZSz7ynbrOhqAv3GRSBV5mJMrcvX2WoJons4TaG1GSyVZrycIF +kgtZ1InJy2szVpR2V07DKnJuB8BVp7UcJSGBKxw= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20231109104759eucas1p263e75fab40bb2b3ad5cc4646e0cd2634~V7rEyTyIH2943429434eucas1p2B; Thu, 9 Nov 2023 10:47:59 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 69.5D.11320.FD8BC456; Thu, 9 Nov 2023 10:47:59 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20231109104758eucas1p2e98e8cf22a42aae212a98228e46b4438~V7rEeWd6a2942529425eucas1p2A; Thu, 9 Nov 2023 10:47:58 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20231109104758eusmtrp252bf200468d54124faf3feab1d57f613~V7rEdi5xx2298322983eusmtrp2t; Thu, 9 Nov 2023 10:47:58 +0000 (GMT) X-AuditID: cbfec7f4-993ff70000022c38-89-654cb8dfa774 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A0.21.25043.ED8BC456; Thu, 9 Nov 2023 10:47:58 +0000 (GMT) Received: from AMDC4653.digital.local (unknown [106.120.51.32]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20231109104758eusmtip2b084c095a97cd533501393d6e8d08ea9~V7rD2N_nf0866008660eusmtip2E; 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 1/2] pwm: samsung: Fix broken resume after putting per-channel data into driver data Date: Thu, 9 Nov 2023 11:47:47 +0100 Message-Id: <20231109104748.2746839-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIKsWRmVeSWpSXmKPExsWy7djPc7r3d/ikGky8zGHxYN42Nou9r7ey W2x6fI3V4vKuOWwWd++uYrSYcX4fk8XaI3fZLX7umsdicXviZEYHTo+ds+6ye9y5tofNY/OS eo/+vwYefVtWMXp83iQXwBbFZZOSmpNZllqkb5fAlXH8aAdjwXn2ikcv1jI2MK5n62Lk5JAQ MJE4cqmHqYuRi0NIYAWjxLdPzSwQzhdGicknzzJDOJ8ZJT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o2tDDSM7S00DMysdQzNDaPtTIyVdK3 s0lJzcksSy3St0vQyzh+tIOx4Dx7xaMXaxkbGNezdTFyckgImEi0tFxg7WLk4hASWMooMWv2 P0aIhIzEyWkNrBC2sMSfa11sEEWfGCV+rGgBS7AJGEp0vYVIiAh0MUr8PraWEcRhFmhlkmg4 sYoFpEpYIEXiYecWZhCbRUBV4vzRo2BxXgF7iT9ze1ggVshL7D94lhkiLihxcuYTsDgzULx5 62zmCYx8s5CkZiFJLWBkWsUoklpanJueW2ykV5yYW1yal66XnJ+7iREYA9uO/dyyg3Hlq496 hxiZOBgPMUpwMCuJ8F4w8UkV4k1JrKxKLcqPLyrNSS0+xGgKdN9EZinR5HxgFOaVxBuaGZga mphZGphamhkrifN6FnQkCgmkJ5akZqemFqQWwfQxcXBKNTBxZWjMmLb0y8Wirz0Lvh+w7Glc eLzSW+eUgcCETXceVLv+d5Wv+R2ZHsTm6v9BlCUgySTLcsXqkvd7p6efv7ZRaNraa+kP/ueJ btj9n3FpZNgq8bCtq2IqHTt4n36dz7ji+8rAb+oSjtaXpK/t+MA5gTNyt33tl8/Ju1d2+zYd tDlvfvDacvu7Ple2r3WON3ynUmz1t/i31j2d71ZZbj9ON6xksJGv/Ljk1cPSX5dZmwxzire/ eX9r+rlP5XcCjvj3HhZcn1I4/2Utf8gCfY0J39ft7MoU5jin6nd873XONT90NpbnHT/zJ/iK aMXVmLB5+p5KFXJLdIQ0n7LJfrnYLq3g58fowMETmcF/r/maEktxRqKhFnNRcSIAc04Y9goD AAA= X-CMS-MailID: 20231109104758eucas1p2e98e8cf22a42aae212a98228e46b4438 X-Msg-Generator: CA X-RootMTR: 20231109104758eucas1p2e98e8cf22a42aae212a98228e46b4438 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20231109104758eucas1p2e98e8cf22a42aae212a98228e46b4438 References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231109_024807_325199_DF902023 X-CRM114-Status: GOOD ( 15.04 ) 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_EXPORTED is misleadingly used as a bit numer in the pwm->flags, not as a flag value, so the proper test for it must use test_bit() helper. This fixes broken resume after putting per-channel data into driver data. Fixes: e3fe982b2e4e ("pwm: samsung: Put per-channel data into driver data") Signed-off-by: Marek Szyprowski Reviewed-by: Sam Protsenko --- drivers/pwm/pwm-samsung.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c index 568491ed6829..69d9f4577b34 100644 --- a/drivers/pwm/pwm-samsung.c +++ b/drivers/pwm/pwm-samsung.c @@ -631,7 +631,7 @@ static int pwm_samsung_resume(struct device *dev) struct pwm_device *pwm = &chip->pwms[i]; struct samsung_pwm_channel *chan = &our_chip->channel[i]; - if (!(pwm->flags & PWMF_REQUESTED)) + if (!test_bit(PWMF_REQUESTED, &pwm->flags)) continue; if (our_chip->variant.output_mask & BIT(i)) 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 MJG4d7SDpYuRi0NIYAWjRMvNF8wQzhdGiVmf9zKCVAkJfGaU6L8sB9Ox6c8ddoii5YwSP+Y+ YoHr2Pz/MTNIFZuAoUTX2y42kISIQBujRNPlD2AOs0Azk0TT726w7cIClhITjlwE62ARUJWY Nb+bDcTmFbCXWLDjEhvEPnmJ/QfPgtVwCjhIXG15xQpRIyhxcuYTFhCbGaimeetssMMlBE5w SLxddp0dotlFYt33LcwQtrDEq+NboOIyEv93zmeCaGhnlFjw+z6UM4FRouH5LUaIKmuJO+d+ AZ3BAbRCU2L9Ln2IsKPEtivzWEDCEgJ8EjfeCkIcwScxadt0Zogwr0RHmxBEtZrErOPr4NYe vHAJ6hwPiX2H5rJNYFScheSdWUjemYWwdwEj8ypG8dTS4tz01GLj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Kjy8qzUktPsRoCnT2 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, }; /*