Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3592139rwd; Sat, 10 Jun 2023 10:26:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ58oDJMxKQehcfVnD9Z8rITFbgoqN9au3WNj7+t411ocodtgely6E9wup+zudwGMl8GJRuQ X-Received: by 2002:a17:907:7d88:b0:977:d53e:4055 with SMTP id oz8-20020a1709077d8800b00977d53e4055mr5684336ejc.58.1686418003364; Sat, 10 Jun 2023 10:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686418003; cv=none; d=google.com; s=arc-20160816; b=J194E7SXX7L+18zlH3m34YexlrY0imYGYMJcgrvn/TyFlAe1EgXUOaRwUxUmVM4T/T KJwTEWTQ1TDEDs23D+PWCpe292tGhF57cfK4qJvrf6D1psfkCabk4g70XpceU8prRU+u JicRPa1suDZi0mY7U481mbTb6+303Db4lYunDKSsoJrMNTa+8GWmpJYacDU8IFx/auFu J+MGXPkf1jr9+gMKZsRmHe8IJNGHeMPq6+3WYJJf0ks/cyhGT8xZGENyX/DJWrNIWMel jJ1ANSKiCj9zCe0ncveqTEqVWu6VqmpyLfYWDX9z16hUODJomne0C0AlcuDvowYGS+jC g+VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=MjQ2vsEQ0b1olIBsdi8RbWmpbxMpAEgvpE67FHp4XrU=; b=u0WpiE3OpPlkRf1CWjkFzTfRWARYjC7eMZt+shW7+WWslj50snouJKbBRi0Gn2w2N6 NWgLwK1m53/o0/7uG5dog+OqaWYTBOfZJUmA5PkpVNnlNZKHukmArXBlCpTmg7wwb7IE NPThuBJcaYpf2UUwEpv16sMFopigukcUsb666yilHaaIe48QBkwG3dI1cCixmxel4quD wq0C4NcCXA3soGCgNtYvaITVOBGc869rYkaj0r5wDlitjHUSM1OfGexl6Z/wnYQddWw8 MuVCs09pZX/wXfFriyHm7wgO9IGr5vN2tGtcnOc3qh4A+YSP/jCjWsafamhOHDS4YWsD 33ZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id md27-20020a170906ae9b00b00977c75aa963si3175463ejb.724.2023.06.10.10.26.17; Sat, 10 Jun 2023 10:26:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229601AbjFJRKa convert rfc822-to-8bit (ORCPT + 99 others); Sat, 10 Jun 2023 13:10:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjFJRK1 (ORCPT ); Sat, 10 Jun 2023 13:10:27 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 461922D68 for ; Sat, 10 Jun 2023 10:10:26 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-170-etAEtKpgMd2HFWTUOuLzjA-1; Sat, 10 Jun 2023 18:10:23 +0100 X-MC-Unique: etAEtKpgMd2HFWTUOuLzjA-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sat, 10 Jun 2023 18:10:19 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Sat, 10 Jun 2023 18:10:19 +0100 From: David Laight To: 'Chen-Yu Tsai' , Mark Brown , "Liam Girdwood" , Manivannan Sadhasivam , Cristian Ciocaltea , Matti Vaittinen CC: "linux-actions@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: RE: [PATCH] regulator: Use bitfield values for range selectors Thread-Topic: [PATCH] regulator: Use bitfield values for range selectors Thread-Index: AQHZmd7Pe+BdgVqXZ0e5XsPeombenK+ER+4A Date: Sat, 10 Jun 2023 17:10:19 +0000 Message-ID: References: <20230608075651.3214540-1-wenst@chromium.org> In-Reply-To: <20230608075651.3214540-1-wenst@chromium.org> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen-Yu Tsai > Sent: 08 June 2023 08:57 > > Right now the regulator helpers expect raw register values for the range > selectors. This is different from the voltage selectors, which are > normalized as bitfield values. This leads to a bit of confusion. Also, > raw values are harder to copy from datasheets or match up with them, > as datasheets will typically have bitfield values. > > Make the helpers expect bitfield values, and convert existing users. > Include bitops.h explicitly for ffs(), and reorder the header include > statements. While at it, also replace module.h with export.h, since the > only use is EXPORT_SYMBOL_GPL. > ... > static const unsigned int atc260x_ldo_voltage_range_sel[] = { > - 0x0, 0x20, > + 0x0, 0x1, > }; Is there any way the change can be done so that un-edited modules fail to compile? Otherwise the whole thing is an accident waiting to happen. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)