Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3753810pxk; Tue, 8 Sep 2020 01:15:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrWSqTCuKg/TLIBV8Fc1S4dG41nFTAHMKm+/EzsK1ib7LItvxPGrBJ7DrExERezDcllNm1 X-Received: by 2002:a17:906:1787:: with SMTP id t7mr1947022eje.173.1599552952423; Tue, 08 Sep 2020 01:15:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599552952; cv=none; d=google.com; s=arc-20160816; b=rLTHqjLOwmUOB9cAUhoVlPH7OXvXWKke8jC3TSji5f0R9xQWNCO0H4/fFmUV7uC7lF RZOD7DEE67zXH7mxqg2oBODj0I3JiIAe4ejhww8Bq4DMAtYQr9xKjIaDTvmdA+2ffGCX frH9mSLErK/eWqraKHkI4HSU0Td/CriM59xHEQRaqWPFpbC8JqJMiaKzyi9SicNc/yTO h3RryW0CND2FNl/goAA02uWun1yqobAqqc9fpJkGOJb5Hh8gf/Lgp866neegErWl8bEa WTjJgUQobZnAgkxRw6O5c502FO8q+M4TdBUn0QNdnI4fDtuG0ZKt5UPUUmhLWHNB/y88 0+9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2l4ulTfYjNlFeRN+9AmUPudn6kXgV7e1zXVy9nKbsRk=; b=xlP8olcwiDbrdoRtpPCXR2C1uiW/QAkho23nbh/FPXrK3Jf6md5f+cHT6iIkOaI1KN KbIsclRQNSgsrETnatYj6c0VrfrrkYk97OqY52Z/Lc+QMC5ILMgzhA9p9eF7hIVuJ1Wd hK43yfqUemrNhjB+FvBMU/P1uxSg+lZqqCC8qMCQCXfTB3VxmEYypmQAdxFv0+TQyI4B R1w6DobyUKVHwgM022ocdCYX0NIg+cb+L7DdEhRWeITOw65gMUKoGJaJw/x4icheqetd kDa/0NMoNH4Rbu9dt9Z0r7+63nBGdhnJW9qDwwa8yjECIzqS1OKmXOkOHxHao+B3/oYw y/YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e4CeBE11; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec14si11258904ejb.320.2020.09.08.01.15.29; Tue, 08 Sep 2020 01:15:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e4CeBE11; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729811AbgIHIOy (ORCPT + 99 others); Tue, 8 Sep 2020 04:14:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729626AbgIHIOw (ORCPT ); Tue, 8 Sep 2020 04:14:52 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD930C061757 for ; Tue, 8 Sep 2020 01:14:50 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id b79so16202458wmb.4 for ; Tue, 08 Sep 2020 01:14:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=2l4ulTfYjNlFeRN+9AmUPudn6kXgV7e1zXVy9nKbsRk=; b=e4CeBE11o3dS4jh5WtgwHvX/aVsAUVjNuZFptYv0FYAuqO1K98mRcanGrEOjNjYNFj 1B9gH057PfWPjo2QcMRrEZMg90NcPkJMcKVMvyDqhWkGR3PSfvFiGsld3X9Wck4HNBUv Uz1InBHYi4s1FbO7LIIYnsOElzCrPVjFJnvoARcO7gCqxYsS4kSDssOgt6yv3aOgFqUh bAQIDjH0Yi92yGMBsA0dpqV4vMOLuZy0WHY0SVfEuPK2ENzhsTbwoTlvongp9Gi2vvGK TEH1KHEHxZnKwqCzYbY46VsbpquCRbEqwMWCV9Z/tnC6T4PkLE5+QXW4TOkCDzT1t9Jr kDvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=2l4ulTfYjNlFeRN+9AmUPudn6kXgV7e1zXVy9nKbsRk=; b=QFdoBCOqK7YnWCczzIsJr6I/7dAGh1HV8gVUFXAOSOTgFLbpqAhY0d+btyiqGQP+Ve MqawuP2MN4g3yUS32Wo0x1IqaZf/HhdOiliP4yQFXUyv+6fpHZUKpx5dvuY/V2gcB+s2 Bgk/JHgu+m6zcgJRTohWHrimFACszIRxcpFofGUIGfkPtknxDiQjgYEjzkzaqa8mwqE1 PJmi4Iw/s1NJDksXrc4ftPAVSxvdwB3DEQd5vZvdbjxpcADLV3XNwtV1GU+FCP/xw9Mv +qtjlnkAzIud5I9lBYLzrtKDH9LXxj838gdSCcPAUM7C4GiQLJ2B36y6yRyPqhtEGxUz xZng== X-Gm-Message-State: AOAM533ncJqn9DcMJAPVqTD58BuHwiESgUUpvA9r7cdicj65n2fRL5Gn uFP/b+5s5ZxctFHM5xErpE2cjA== X-Received: by 2002:a1c:5641:: with SMTP id k62mr3330505wmb.13.1599552888802; Tue, 08 Sep 2020 01:14:48 -0700 (PDT) Received: from dell ([91.110.221.204]) by smtp.gmail.com with ESMTPSA id 71sm33594957wrm.23.2020.09.08.01.14.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 01:14:48 -0700 (PDT) Date: Tue, 8 Sep 2020 09:14:45 +0100 From: Lee Jones To: Andy Shevchenko Cc: Jonathan =?iso-8859-1?Q?Neusch=E4fer?= , "linux-kernel@vger.kernel.org" , Rob Herring , Thierry Reding , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Alessandro Zummo , Alexandre Belloni , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Sam Ravnborg , Linus Walleij , Heiko Stuebner , Stephan Gerhold , Lubomir Rintel , Mark Brown , allen , Mauro Carvalho Chehab , "David S. Miller" , "devicetree@vger.kernel.org" , "linux-pwm@vger.kernel.org" , "linux-rtc@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Heiko Stuebner , Josua Mayer , Andreas Kemnade , Arnd Bergmann , Daniel Palmer Subject: Re: [PATCH v2 05/10] pwm: ntxec: Add driver for PWM function in Netronix EC Message-ID: <20200908081445.GC4400@dell> References: <20200905133230.1014581-1-j.neuschaefer@gmx.net> <20200905133230.1014581-6-j.neuschaefer@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 05 Sep 2020, Andy Shevchenko wrote: > On Saturday, September 5, 2020, Jonathan Neuschäfer > wrote: > > > The Netronix EC provides a PWM output which is used for the backlight > > on some ebook readers. This patches adds a driver for the PWM output. > > > > Signed-off-by: Jonathan Neuschäfer > > --- > > > > v2: > > - Various grammar and style improvements, as suggested by Uwe Kleine-König, > > Lee Jones, and Alexandre Belloni > > - Switch to regmap > > - Prefix registers with NTXEC_REG_ > > - Add help text to the Kconfig option > > - Use the .apply callback instead of the old API > > - Add a #define for the time base (125ns) > > - Don't change device state in .probe; this avoids multiple problems > > - Rework division and overflow check logic to perform divisions in 32 bits > > - Avoid setting duty cycle to zero, to work around a hardware quirk > > --- > > drivers/pwm/Kconfig | 8 ++ > > drivers/pwm/Makefile | 1 + > > drivers/pwm/pwm-ntxec.c | 160 ++++++++++++++++++++++++++++++++++++++++ > > 3 files changed, 169 insertions(+) > > create mode 100644 drivers/pwm/pwm-ntxec.c > > > > diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig > > index 7dbcf6973d335..7fd17c6cda95e 100644 > > --- a/drivers/pwm/Kconfig > > +++ b/drivers/pwm/Kconfig > > @@ -350,6 +350,14 @@ config PWM_MXS > > To compile this driver as a module, choose M here: the module > > will be called pwm-mxs. > > > > +config PWM_NTXEC > > + tristate "Netronix embedded controller PWM support" > > > > > > + depends on MFD_NTXEC && OF > > > I don’t see need to reduce test coverage and use of the driver by sticking > with OF. Actually it’s not used. If the device is only known to boot with OF, then it's pointless building it when !OF. If you want to increase test coverage enable COMPILE_TEST instead. -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog