Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp34811rwl; Thu, 6 Apr 2023 12:46:26 -0700 (PDT) X-Google-Smtp-Source: AKy350bw0J4bDHGrhdX6EgVYYump9NjxJSOrjfjVumZD/IGTOWDN5gAML0uaP5ZhCT4OKRfbvTQ6 X-Received: by 2002:aa7:cb18:0:b0:4fb:994d:42c9 with SMTP id s24-20020aa7cb18000000b004fb994d42c9mr617282edt.24.1680810386657; Thu, 06 Apr 2023 12:46:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680810386; cv=none; d=google.com; s=arc-20160816; b=EDffJn+yYh18Jimc8mWkOZf7C+32Iqrfk9288iBMUoKV0LDk/Mkz4LqARi+Xvro+OG xW+H3wlLN67KRFgQDHjCURUk/oZUtXgItSJAM4MXv5gSz0Ww8+BXsGsKU1JAUCKdCHf7 BZmlvpQhRfwui5lImgyygbIcq8xkz2yuCWuKjtAjMzf6x5NNEEXEbITuMC9DlUyy2LMP 7NgsWJoFp2nBKSwjKBlYbRueffw4n3kdLrfscARqWPpKm3FwcisIQjp9a3gdCWs+GMBs 4U8o1yVSW91wy1H8RkjFWWx7vYvQj050w9W8i4dgbRUvlbTWlLODObpmnzPJv5sBEMUH E2Ew== 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=EK3fzbe5+X0+zxNKNJ1I6F2pPMdvVE8OkksanhvKrFs=; b=gcV+7gx+9Wo4MrOuDoWzZ3RvTalivBbRB9N5rOyFWBfvrTfzzNxvlznhQ4PEr6XLHp nq4IQJjDatMCbDNEG2sni+naSC26EuuUONFOJxuMcKkT88R6Cl7/bCwv4VDSLq25+Abe oHZy72WJuwNb9FPFZLvcVLdHTceg/nw0mtVluNTJnwDNy4l5Ux0gqmlZxRgAi67UDdVN 0sdjr9LDQkjCbmPZV+gD5qCSxHmNuGWEHfs9vSLFP6ffjTbKouKYFJ/iJAJUlzSdVuKs bpwGF8ZhYUxkNXM7sqIVRZMcjrLckFRfAuCF3BVRMC1eASs+PW6F5L268KIcvsVj/jQZ DNCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20220719 header.b=3V1WE+zt; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m14-20020a50ef0e000000b004ae08218725si1608365eds.303.2023.04.06.12.46.01; Thu, 06 Apr 2023 12:46:26 -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=fail header.i=@kemnade.info header.s=20220719 header.b=3V1WE+zt; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237462AbjDFTpv (ORCPT + 99 others); Thu, 6 Apr 2023 15:45:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230001AbjDFTpu (ORCPT ); Thu, 6 Apr 2023 15:45:50 -0400 Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a01:238:4321:8900:456f:ecd6:43e:202c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEF0D9F; Thu, 6 Apr 2023 12:45:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20220719; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EK3fzbe5+X0+zxNKNJ1I6F2pPMdvVE8OkksanhvKrFs=; b=3V1WE+ztaydYic26h12m7RgGCa 96Ex3OZ4X2tNddmqeyQv0L3WI/gAZnA24HtxNF3KdB2EHmj3NJKebU+EmhxlZHE9jOPex5K5vfack KDcximceBQL+N8xgyem1pfEwIZFqPiQ8628mT0wuaC5sNsJUtDwH3/7QamQuAfTiqzN5WTqJ4KX+e 2yOycYWpcjMN/FvMzskcycqfwObkircCO9HvMN7YpI6DxRFurkVbIwvyPo4QkDbaOdi7fq9ldqRe6 r/nXGyGaGQIGs95az2mnrpsP/RJmvBudHbW6Kg51UiAGAlG1c99RNjq4eo/p/U8B02Dx3QAacX+5f rCF7l8YQ==; Received: from p200300ccff190e001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff19:e00:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1pkVYD-00038N-CR; Thu, 06 Apr 2023 21:45:41 +0200 Date: Thu, 6 Apr 2023 21:45:39 +0200 From: Andreas Kemnade To: Matti Vaittinen Cc: pavel@ucw.cz, lee@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, hns@goldelico.com Subject: Re: [PATCH 2/2] leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver Message-ID: <20230406214539.59dfaac7@aktux> In-Reply-To: <7d8c558f-0d21-91ed-ecd0-cac079d366ee@gmail.com> References: <20230406060825.103187-1-andreas@kemnade.info> <20230406060825.103187-3-andreas@kemnade.info> <7d8c558f-0d21-91ed-ecd0-cac079d366ee@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.24; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Thu, 6 Apr 2023 11:57:15 +0300 Matti Vaittinen wrote: [...] > > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#define BD2606_MAX_LEDS 6 > > +#define BD2606_MAX_BRIGHTNESS 63 > > +#define BD2606_REG_PWRCNT 3 > > +#define ldev_to_led(c) container_of(c, struct bd2606mvv_led, ldev) > > + > > +struct bd2606mvv_led { > > + bool active; > > I didn't spot where this 'active' was used? > [..] > > + if (reg < 0 || reg >= BD2606_MAX_LEDS || > > + priv->leds[reg].active) { here > > + of_node_put(child); > > + return -EINVAL; > > + } > > + led = &priv->leds[reg]; > > + > > + led->active = true; and here Regards, Andreas