Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1610638imw; Tue, 5 Jul 2022 12:19:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1utX0P+ufp8vS9rmzi3KnV8ALPtS2QuMO8P06YS4zA6j+vTD9azT5xdCZAAgJPQovMrmfqO X-Received: by 2002:a17:90b:1b0d:b0:1ef:9fcb:cdd2 with SMTP id nu13-20020a17090b1b0d00b001ef9fcbcdd2mr4159710pjb.125.1657048762726; Tue, 05 Jul 2022 12:19:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657048762; cv=none; d=google.com; s=arc-20160816; b=0GQI9sHIDw83Tz8yqvvHgulLWE27CEDVMI48TX30DgxvM6nfzrW1F6mlQlrdeOH0qE 5bNYovxWBT6fq6Zm97Kacyodh3yiMndRTMwvVIdPXyZgJRvEiP9VNjLsteh/sINzRUHq UI1F2+Ctm+d+ljkYUo5jLFFjK22Gpvf3v1kd1TFcgGX+avgCfJDcR9t1HeJmbrKNBxcd 8mZg9MjOlEawQK5s9XlJMwnVIOqChW3RCZtTdVUDp1hMtcX1YzvfBApPglZn/Jq5XH+U XEadI5t0vG1I0lDnMEiS/d71olj2FWN8o/qKcdT70qaJSCFej3teYM/3Um7+Vzh5eEhf FNnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yja7doOEpycm6RswSNt6Ndu5Y1PCKNLpIKO/qkkV0nE=; b=O0Jzdhko94HgMYPOPooB4fBPWfwGuN7BpzQWhbrpyDSztfp3jwW44KuFPjxWnrnv3M NcD1ns5RdPoew67Svsa9vohRTqaoqF+yaboKjG2lF7IyTl9dE2nUsLt7gMPA99iVL1qq RzYySPgz0JBzagiHaQt62xc7hWhW2mG2UyQJz/BecilUV0F3g40McPq3ypTZxE8CC201 NP27WXjdpGAl5PD1uy8tq+uQ47mdf/A7lf4yLLvzrrYiEsWxUz10LMaAn+IZvArJhJt2 rJDc+7jDtSlVHfNscvv8AcLqQEVqNSNPXdg4cSJqNpLGl2PtU7DwiQjiHFR8hOh3DuIC YSgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=a55i++zW; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a170902e94e00b00163b98f6047si15049147pll.116.2022.07.05.12.19.09; Tue, 05 Jul 2022 12:19:22 -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=@gmail.com header.s=20210112 header.b=a55i++zW; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233018AbiGESwd (ORCPT + 99 others); Tue, 5 Jul 2022 14:52:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232836AbiGESwa (ORCPT ); Tue, 5 Jul 2022 14:52:30 -0400 Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26EE51EEDA; Tue, 5 Jul 2022 11:52:30 -0700 (PDT) Received: by mail-yb1-xb35.google.com with SMTP id j7so17097526ybj.10; Tue, 05 Jul 2022 11:52:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yja7doOEpycm6RswSNt6Ndu5Y1PCKNLpIKO/qkkV0nE=; b=a55i++zWl7RlFm3zSrT5LvAALOmVDqFD54SzizUFEfNwQRdB6Ou3Nnn7B+iZEQf1lU PdGlmjvHtewS8WBW4VCSms4/L+CEQKjCVM3IHfw5EZdIlVypuM0/ZF13ZqFeCJ6phl7f 9Z5WQ21aGvw1n3m7g5oAcPQAZLEJMf8xV+hvC5Y0Mq9uOJy/YHfJUsnVccZnWAlDsMmQ D+sNWKP+6nw9Gp/QWzcYQWt9nwX63aHvWbkOLhJjKZGupYEu7hN21C6tpra2B7n5oqB9 gfNrGNfFKEzRy9rpeyFHhZLpzE8Yf3kdH4CbwgbX5mGrkzBvGZi78uxoOEfNUf9/ahUt Fl6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yja7doOEpycm6RswSNt6Ndu5Y1PCKNLpIKO/qkkV0nE=; b=QMYylGvFUFs7EZi5kNXYW4fXRWs74bcQppWVI0qn8NG1wc2Zfji8bnq3ufeN8aKwtE RwzwSjuZty2fqNLx0nAgqPt9EUD9DvUTXhQUCAxrPs2P6jGp41OmbFJ+WMNCXlOURI5M ZSkFAoMh4bEm1dxPyZWZ2x+0Vp5YpbfGjbCUsU/udaMvD1Sotx3w23D5I9ULf7+KcxDF +tb6zfiscsTOyiQzD+A5EpHodEAiNr9lfeOUsu8AULS/bDoT+90Hvq4SNyGyTsblbMkK man47PYgeB+0IFA0/gLeI8LaPI1+cgr47l9TeTMlXFklK/N+7WrPZ0C8rwtJMUWdrqJe UXqw== X-Gm-Message-State: AJIora/fDQospK+tOYRwfab8vtez3GnxRMK3895qamdnlklQ1d9hUoUl h3tnvsxb3prXlEa1kDgQiOyXQEsCNDJCwf8trUM6s4htNPzxHw== X-Received: by 2002:a25:858e:0:b0:66e:4898:63e2 with SMTP id x14-20020a25858e000000b0066e489863e2mr14635194ybk.296.1657047149337; Tue, 05 Jul 2022 11:52:29 -0700 (PDT) MIME-Version: 1.0 References: <20220705163136.2278662-1-vincent.knecht@mailoo.org> <20220705163136.2278662-6-vincent.knecht@mailoo.org> In-Reply-To: <20220705163136.2278662-6-vincent.knecht@mailoo.org> From: Andy Shevchenko Date: Tue, 5 Jul 2022 20:51:52 +0200 Message-ID: Subject: Re: [PATCH v3 5/6] leds: is31fl319x: Move chipset-specific values in chipdef struct To: Vincent Knecht Cc: Pavel Machek , Rob Herring , Krzysztof Kozlowski , Linux LED Subsystem , devicetree , Linux Kernel Mailing List , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, "H. Nikolaus Schaller" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Tue, Jul 5, 2022 at 6:33 PM Vincent Knecht wrote: > > Allow setting chips' specifics in chipdef struct by adding fields for: > - the reset register address > - a pointer to a regmap_config struct > - a pointer to a brightness_set function > - current default, min and max values > - a boolean to distinguish 319{0,1,3} and 319{6,9} chips > and use those fields in places where distinction has to be made. > > The fields for 319{0,1,3} still point to 319{6,9} values. > No functional change. ... > +static bool is31fl319x_readable_reg(struct device *dev, unsigned int reg) > +{ /* we have no readable registers */ Non-standard place for comments. > + return false; > +} ... > +static const struct reg_default is31fl3196_reg_defaults[] = { > + { IS31FL3196_CONFIG1, 0x00}, > + { IS31FL3196_CONFIG2, 0x00}, > + { IS31FL3196_PWM(0), 0x00}, > + { IS31FL3196_PWM(1), 0x00}, > + { IS31FL3196_PWM(2), 0x00}, > + { IS31FL3196_PWM(3), 0x00}, > + { IS31FL3196_PWM(4), 0x00}, > + { IS31FL3196_PWM(5), 0x00}, > + { IS31FL3196_PWM(6), 0x00}, > + { IS31FL3196_PWM(7), 0x00}, > + { IS31FL3196_PWM(8), 0x00}, Missed space before }. > }; -- With Best Regards, Andy Shevchenko