Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp253879rdb; Thu, 21 Dec 2023 08:14:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IEgu0T9HEtkTeS3FIjigvJwspUF0r3/HXsFmIODt2jmdz7R7K7ttRx+EuTt2escITwuoo2X X-Received: by 2002:ac5:c359:0:b0:4b6:b728:1b3f with SMTP id l25-20020ac5c359000000b004b6b7281b3fmr935756vkk.25.1703175277367; Thu, 21 Dec 2023 08:14:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703175277; cv=none; d=google.com; s=arc-20160816; b=ZagUpoU9MqsqZwfPIE4Qhl8rJ+auAFh6UByDmf8vSoLlS2LLVGLjoDHj8OUcX7mdNK wviY+jKTddxAWVrMaM937skrktwEYeKmN7C6nccvdyH2kY0na7/od2gBQR03ObJB/ehI ybgBptb5cVipbGYyITbF+NjfhMhCBJr/wgI7Q/aDHWK5Lc60uB9wpvLcmXbgv0YK3Ffb r/7w/DhO1TmEsV/fbVRCHhFzuXRK8OHF7tD0uMUJsnGW52GWdazqHnq1el74BokkJd+p sTEE/GdwUUsT21KL/xfaUkyvFCGPjszVCBviuTZikeZIZACXBTmU5N/T9XgILoVFbuhI cORw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=b6dmznPM0FmPocLDQ/xrvej5Hlt0A6zj5J7D3+j+igo=; fh=/DyIwXDqluvpszdnCmQYqZCnxswyooy8X3I3SLXM5BQ=; b=h+etgAy/2rA0bO1taBlEkP0m6b+jkGrxpW6SM7/iFAPJVdNdf4YaVCUfhChGOZdDCx HRzbDQdeQczkj0Sk/KOVLMd1AX8xy7Wuk5a+njr3yUTS6jDBo0CPYzWsqtpGNamOStis PZO7NwWU8jKxqdG2WeWr3Ngj6RWenWhWKPZSHQtILy9FfduEGffQ3DWr7uk6j7DqnBR2 glTPTWv550BLucWZRME8o+so22faSHPCznUQlrAg5UcgJ+afqHI+Tg48TnKRxssTp+t6 fm71NNrrunSRsKfgp8imk7cfRhKWVpi1GOgaxHCNQypcVmSbrLoxBiGRomxgjDrHoY51 sSZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XqHxzRBq; spf=pass (google.com: domain of linux-kernel+bounces-8742-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u14-20020ac5cdce000000b004b4da6a7859si471794vkn.295.2023.12.21.08.14.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 08:14:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8742-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XqHxzRBq; spf=pass (google.com: domain of linux-kernel+bounces-8742-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1BE2E1C24246 for ; Thu, 21 Dec 2023 16:14:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D45F855E7B; Thu, 21 Dec 2023 16:10:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XqHxzRBq" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 069C476DA7; Thu, 21 Dec 2023 16:10:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37C21C433C9; Thu, 21 Dec 2023 16:10:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703175016; bh=XsGNm0AxLUX5TyAOH4kb3dbYCONd1jCjNAPoAGbgUWg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XqHxzRBqprviCEjX4TSX525TtrRC+DrWK5vfRRRPInYxRq3M4FtPoKPCiMwcva6pp rabxccGeq586WlCdJzFh+m90tDMhvAqrQhSCDesoz1Y443g5Hoj9xhJnC92dcGitut spf8qIgNQWfVtgrvwrm4/+C9PhbwTPxIF+hKgcEW2aTfRpI9tFSe30F5alXlT2E3mp QplsFJ+WsKMvjo+2QlMUheOlhUbjz8cbD810DsdKolrq7qmsiEfiwhA5ST6GAEcb/U IT0TWPkMXI9XG6bBx5Rm75223yKnK2I4vLPPFU25CpukFt7cHolFIPoMVpC672u+IW AX8p3wNd3of/g== Date: Thu, 21 Dec 2023 16:10:11 +0000 From: Lee Jones To: Martin Kurbanov Cc: Pavel Machek , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, kernel@salutedevices.com, Greg Kroah-Hartman Subject: Re: [PATCH v1 1/2] leds: aw200xx: support for hw pattern controllers Message-ID: <20231221161011.GO10102@google.com> References: <20231207125938.175119-1-mmkurbanov@salutedevices.com> <20231207125938.175119-2-mmkurbanov@salutedevices.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231207125938.175119-2-mmkurbanov@salutedevices.com> On Thu, 07 Dec 2023, Martin Kurbanov wrote: > This led-controller supports 3 pattern controllers for auto breathing or > group dimming control. Each pattern controller can work in auto > breathing or manual control mode. All breathing parameters including > rising/falling slope, on/off time, repeat times, min/max brightness > and so on are configurable. > > Signed-off-by: Martin Kurbanov > --- > .../testing/sysfs-class-led-driver-aw200xx | 108 +++ > Documentation/leds/leds-aw200xx.rst | 274 ++++++++ > drivers/leds/leds-aw200xx.c | 649 ++++++++++++++++++ > 3 files changed, 1031 insertions(+) > create mode 100644 Documentation/leds/leds-aw200xx.rst This interface is bananas. Exposing an entire register interface to sysfs does not sit will with me at all. When we add support to a sysfs class, we usually require it to be generic and work across all devices. Adding device specific interfaces is generally decried and to be avoided. Don't forget, once we commit something to sysfs, it becomes ABI and we have to support it forever. A far better approach would be to add support for this in userspace instead You can use the standard I2C character device API to achieve the same result. That way we don't have the same level of commitment and is generally a much more flexible/future-proof. -- Lee Jones [李琼斯]