Message ID | 20231109104748.2746839-2-m.szyprowski@samsung.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp347973vqs; Thu, 9 Nov 2023 02:48:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IF79ENNEeSQP5z+s7O+Fi8yJd2R9wDV16xLYWRQs2SbNvTviFjD/BevRtYDI264E5G2kIHb X-Received: by 2002:a05:6358:3388:b0:168:dd37:172d with SMTP id i8-20020a056358338800b00168dd37172dmr5147799rwd.20.1699526898319; Thu, 09 Nov 2023 02:48:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699526898; cv=none; d=google.com; s=arc-20160816; b=iHw2Gl4/WLkTtLrTyq+rYMW0LuZwtao/FHggyoy8SxAYQPpuxslZGzYQYPoDUgESOo /lfHNhHDzKMccjCQiEeuI3H+iAhjl9Jy6WZdRbQMTgOm5bAOXOEKO3wiqTQ9GhFjtmzH 7BvT2WmGZhOi2keyUoChzAgrl5HmbgsRzwRVUDHfV1wwc9L5ABa4vOWleSjPoTsOHxN0 3JmFfFU1xp9GBffBsO8+uugz/L67cIM3Ta66x/Ck+2Qp6r6NfkQ+pwesXLbvOOEREKw8 cXQzHs8EI2yL+MY81Zaf5Hg0k00v8FQkZb31yjuo9HGcXGBNQ51pNXYm2I4AJj71GNjb vuLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :mime-version:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=QcnjUhE7gQh9uk1LcSTbnLaNbz1wrxJZ4+wU5MZqD8g=; fh=YMw418W8OA/VEb1RSCKJuPXYPOCnUfhZ2ammJU9c6yU=; b=gJZp+RiHiK1soAWZ2wy7JPCZbkVrlxIfpMeFftEpaH4NhGz+6f3dCtJg2mK0xRvdug UviGi/XBwdrDBzh+UDFd25v+cd//b6wZ7bJJuwORl33esBoh8LT1B8hH9BQitxiZ2HzR XULSaTnVCQMB8JpOgLbqw/ekK6rDbMsUEyJ5YtTOZ+/gn+9a1QfRa2MeNFzx7qRdZzLP pQSZw+AJcJQ4inG9v6CbCBH6ST4rxsK1ugnD78YBM6s8X2Fq5CfyZLqOhxFDshgBli// r1CXjdVYVrIYr+eH3DMoL+ZJ1RjrU3IE3k/07sPfMcSCKVKQCo8tQQQLMSfQ3MU+1yEO 8g0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ExkYYcDY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id m189-20020a633fc6000000b005bdf5961633si2063826pga.21.2023.11.09.02.48.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 02:48:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ExkYYcDY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 215E782A3E46; Thu, 9 Nov 2023 02:48:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232776AbjKIKsH (ORCPT <rfc822;jaysivo@gmail.com> + 32 others); Thu, 9 Nov 2023 05:48:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231839AbjKIKsF (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 9 Nov 2023 05:48:05 -0500 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B7D22696 for <linux-kernel@vger.kernel.org>; Thu, 9 Nov 2023 02:48:02 -0800 (PST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20231109104800euoutp0220b9f16c220627d1400a0c229034e65a~V7rFoqlkG0630506305euoutp02h for <linux-kernel@vger.kernel.org>; Thu, 9 Nov 2023 10:48:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20231109104800euoutp0220b9f16c220627d1400a0c229034e65a~V7rFoqlkG0630506305euoutp02h 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 <m.szyprowski@samsung.com> 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 <m.szyprowski@samsung.com>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Alim Akhtar <alim.akhtar@samsung.com>, Thierry Reding <thierry.reding@gmail.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de> 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 Content-Transfer-Encoding: 8bit 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 vHAJ6hwPiX2H5rJNYFScheSdWUjemYWwdwEj8ypG8dTS4tz01GLjvNRyveLE3OLSvHS95Pzc TYzAVHT63/GvOxhXvPqod4iRiYPxEKMEB7OSCO8FE59UId6UxMqq1KL8+KLSnNTiQ4zSHCxK 4ryqKfKpQgLpiSWp2ampBalFMFkmDk6pBib2GGXtRd5mL5QfZtS4acRdttrVFRjm9ynj1aSw 1W28m5Y0iovmtsWHZNyeXdpieebJBt9ZKn/WX1N/prU/WG572PwuhWW69/PeTI7huFIazv/q Y6L630cc3w/Pk+I4bM00Jf2v0bGYDSpdDhV/ZP6vcHYsPmHMbKx5WVHnr/81hrM53T9+sDC7 nvHOXG13bK6MebF7pOqa7heOB2MumWpF9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WuTbFbnq7NO1WFJ2y2eE15y6vKtHTN/i51apvX5xcGz J3sNTKOervmz6Vv1Jq9nDI3ZsyadWX43dI71QgH77QyaZ8uudgs7MWznOnhX7/Ka/IPTlViK MxINtZiLihMB4i5jEyEDAAA= X-CMS-MailID: 20231109104759eucas1p1fc7343ea2b113abd18397833d70d6835 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20231109104759eucas1p1fc7343ea2b113abd18397833d70d6835 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20231109104759eucas1p1fc7343ea2b113abd18397833d70d6835 References: <20231109104748.2746839-1-m.szyprowski@samsung.com> <CGME20231109104759eucas1p1fc7343ea2b113abd18397833d70d6835@eucas1p1.samsung.com> Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 09 Nov 2023 02:48:16 -0800 (PST) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782083116877375313 X-GMAIL-MSGID: 1782083116877375313 |
Series |
[1/2] pwm: samsung: Fix broken resume after putting per-channel data into driver data
|
|
Commit Message
Marek Szyprowski
Nov. 9, 2023, 10:47 a.m. UTC
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 <m.szyprowski@samsung.com>
---
include/linux/pwm.h | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
Comments
On Thu, Nov 9, 2023 at 4:48 AM Marek Szyprowski <m.szyprowski@samsung.com> wrote: > > 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 <m.szyprowski@samsung.com> > --- Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> > 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, > }; > > /* > -- > 2.34.1 >
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, }; /*