* Re: [linux-sunxi] [PATCH 2/5] pwm: Add Allwinner A31 SoC support
[not found] ` <20161011063449.54775-2-icenowy@aosc.xyz>
@ 2016-10-11 9:02 ` LABBE Corentin
2016-10-11 12:45 ` Maxime Ripard
1 sibling, 0 replies; 2+ messages in thread
From: LABBE Corentin @ 2016-10-11 9:02 UTC (permalink / raw)
To: Icenowy Zheng
Cc: Thierry Reding, Rob Herring, Maxime Ripard, Chen-Yu Tsai,
Russell King, linux-pwm, devicetree, linux-kernel, linux-sunxi
Hello
I have a minor comment below
On Tue, Oct 11, 2016 at 02:34:46PM +0800, Icenowy Zheng wrote:
> This adds a generic PWM framework driver for the PWM controller found
> on Allwinner A31 and A31s SoCs.
>
> The PWM controller is different with other Allwinner SoCs, with a
> control register per channel (in other SoCs the control register is
> shared), and each channel are allocated 16 bytes of address (but only 8
> bytes are used.)
>
> In order to use the driver for all channels, device nodes should be
> created per channel.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
> ---
> drivers/pwm/Kconfig | 10 ++
> drivers/pwm/Makefile | 1 +
> drivers/pwm/pwm-sun6i.c | 323 ++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 334 insertions(+)
> create mode 100644 drivers/pwm/pwm-sun6i.c
>
> +
> +static int sun6i_pwm_probe(struct platform_device *pdev)
> +{
> + struct sun6i_pwm_chip *pwm;
> + struct resource *res;
> + u32 val;
> + int ret;
> + const struct of_device_id *match;
> +
> + match = of_match_device(sun6i_pwm_dt_ids, &pdev->dev);
match is not used after.
Regards
Corentin Labbe
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2/5] pwm: Add Allwinner A31 SoC support
[not found] ` <20161011063449.54775-2-icenowy@aosc.xyz>
2016-10-11 9:02 ` [linux-sunxi] [PATCH 2/5] pwm: Add Allwinner A31 SoC support LABBE Corentin
@ 2016-10-11 12:45 ` Maxime Ripard
1 sibling, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2016-10-11 12:45 UTC (permalink / raw)
To: Icenowy Zheng
Cc: Thierry Reding, Rob Herring, Chen-Yu Tsai, Russell King,
linux-pwm, devicetree, linux-kernel, linux-sunxi
[-- Attachment #1: Type: text/plain, Size: 981 bytes --]
Hi,
On Tue, Oct 11, 2016 at 02:34:46PM +0800, Icenowy Zheng wrote:
> This adds a generic PWM framework driver for the PWM controller found
> on Allwinner A31 and A31s SoCs.
>
> The PWM controller is different with other Allwinner SoCs, with a
> control register per channel (in other SoCs the control register is
> shared), and each channel are allocated 16 bytes of address (but only 8
> bytes are used.)
>
> In order to use the driver for all channels, device nodes should be
> created per channel.
I don't think there's any need for a new driver that duplicates most
of the logic. The bitfields look roughly the same, and the only
difference is the split difference.
This is something that can easily be handled without creating a new
driver using regmap's reg_field, or through an intermediate functino
that returns the register offset.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-11 12:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20161011063449.54775-1-icenowy@aosc.xyz>
[not found] ` <20161011063449.54775-2-icenowy@aosc.xyz>
2016-10-11 9:02 ` [linux-sunxi] [PATCH 2/5] pwm: Add Allwinner A31 SoC support LABBE Corentin
2016-10-11 12:45 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox