Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2167991rwd; Sun, 28 May 2023 09:24:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4DvKh7X4RhmMaHA6/9ZhOaKYufy/WDy0Qc7esWUxGEPIEI7xoFJE7rj5SQRhja6oNm/TZ5 X-Received: by 2002:a05:6a20:7f82:b0:107:35ed:28a7 with SMTP id d2-20020a056a207f8200b0010735ed28a7mr6283674pzj.8.1685291093992; Sun, 28 May 2023 09:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685291093; cv=none; d=google.com; s=arc-20160816; b=j4WO0M5pZfQoYmL8MBRcWzXKVKfCMaJh6l5yXFvoy684O2iiZjSEhrNxqO/FiM6sf0 9wpVs2rxfjHwkkZ3cQfnWsYQIR0ds4+LrO5zpaj0+CUleXx5GSfnPGuAAZ6dOvgDYDmH hRlD0zZ/OiFJVltTH1AzrKQyUUbd0X7lDv+xs4d+XI5TSLwIadXn69XewDGdgttmPrKu +ZgP7lBssihbCtPfLz/qOzSnv3cB4KXSRYsosp0xANZQTWfEjntbYawfQu2MO1vshNDW fI70zYuUmfRQyaRWMCK9TwAS5718Dj++NJ30zeqp9cVXsqJKiUpaN3CBXBAcUPncBYQD 8lUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=6pnVa0g5Zj9NH795hSgxE8GHShkDi1uvjuqZxMC5iMk=; b=QrU66GuMyY6pbjn4z77OiCTE8Jnre77LG8BRmJih7xc7KwOMy8HO0wgUlm3JndZSqf 5j6yY1QjDvSNpVdzM92ophomM1ouAsARgNCVN8GOFguKNNqbm6NUsovfhHApjmtqq7VZ aNGvYrDd/VE1OXQCdEhEcXY61IlOdUjuGEulqlc5o0/m/lucqPkeFq6bigp9MFN2vM0x dqalNN9cNNnFvvG/GbVQ1AuxpMqO/KUzGM0DCPMX02gvuoYCQ4p+MYXJtthEnVxTm0KF xFMKSUqXE6FTEFeLZPuf2mteWHNjfukVvElcYgYWoaVrzgApGlytuj7XZYzF7e/aKOXE EamQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ozKYerTI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nu15-20020a17090b1b0f00b00255bc974374si2592241pjb.167.2023.05.28.09.24.40; Sun, 28 May 2023 09:24:53 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ozKYerTI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229523AbjE1O4k (ORCPT + 99 others); Sun, 28 May 2023 10:56:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjE1O4i (ORCPT ); Sun, 28 May 2023 10:56:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B27C9B; Sun, 28 May 2023 07:56:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9947560D2E; Sun, 28 May 2023 14:56:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8421C433D2; Sun, 28 May 2023 14:56:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685285797; bh=dYRUdw6cd80d3tuK/aTvNjJCPgSv66gl3Tan1xRID+Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ozKYerTIdU290Z5Ru5InZuObVJvZ7SRayUrYO6E1jm9GIjlKx3UL9+UkVSR2HwPkT PV2nBCOF0IxrDlwqVWNPBRFsmHFVbpBo5jt+zl46YKbuaxCkA+hcnzAZJ/BJMgZNEZ /iyhprd7ImIz+xH69Up6SKvCtRjuMo447Mz8DZmvpfr9DEIzJfzOBruUkXUNSGjFnC aR9+7VzVF2F6VE1PBRHddvYZmCXoszln5131uQjS4D0AfAsVDw0FMygMpsU2tEU4uA gMlndYp1VsE//TbFheeT+c7/cT52tKYKwcYVLld5bpe1dSCAUbbsmxnAdpwLropBic beBWU9vY3JUfQ== Date: Sun, 28 May 2023 16:12:55 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: George Stark , lars@metafoo.de, neil.armstrong@linaro.org, khilman@baylibre.com, jbrunet@baylibre.com, martin.blumenstingl@googlemail.com, nuno.sa@analog.com, linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, kernel@sberdevices.ru Subject: Re: [PATCH v2] meson saradc: add iio device attrib to switch channel 7 mux Message-ID: <20230528161255.216fee6f@jic23-huawei> In-Reply-To: References: <20230527214854.126517-1-gnstark@sberdevices.ru> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Sun, 28 May 2023 13:55:20 +0300 Andy Shevchenko wrote: > On Sun, May 28, 2023 at 01:46:37PM +0300, Andy Shevchenko wrote: > > On Sun, May 28, 2023 at 12:48:54AM +0300, George Stark wrote: > > ... > > > > +static const char * const chan7_vol[] = { > > > + "gnd", > > > + "vdd/4", > > > + "vdd/2", > > > + "vdd*3/4", > > > + "vdd", > > > + "ch7_input", > > > +}; > > One more thing to discuss (Jonathan, what's your opinion?) I think the > following easier to understand and has less problematic characters in the names > (in case of sysfs direct use from shelll): I suspect no one would use these particulary inputs directly from the shell, but agreed that avoiding / where not absolutely necessary is a good idea. Jonathan > > static const char * const chan7_vol[] = { > "gnd", // alternatively GND > "0.25vdd", // alternatively 0.25_vdd, 0.25Vdd, 0.25_Vdd > "0.5vdd", > "0.75vdd", > "vdd", // Vdd > "ch7_input", > }; > > That said, my personal preference: > > static const char * const chan7_vol[] = { > "GND", > "0.25Vdd", > "0.5Vdd", > "0.75Vdd", > "Vdd", > "ch7_input", > }; >