All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	linux-pwm@vger.kernel.org,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	dri-devel@lists.freedesktop.org,
	Boris Brezillon <boris.brezillon@bootlin.com>,
	Rob Herring <robh+dt@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1 3/7] mfd: add atmel-lcdc driver
Date: Wed, 15 Aug 2018 06:24:35 +0100	[thread overview]
Message-ID: <20180815052435.GA6412@dell> (raw)
In-Reply-To: <20180812184629.3808-3-sam@ravnborg.org>

On Sun, 12 Aug 2018, Sam Ravnborg wrote:

> The LCDC IP used by some Atmel SOC's have a
>     multifunction device that include two sub-devices:
>     - pwm
>     - display controller
> 
> This mfd device provide a regmap that can be used by the
> sub-devices to safely access the registers.
> The mfd device also support the clock used by the
> LCDC IP + a bus clock that in some cases are required.
> 
> The driver is based on the atmel-hlcdc driver.
> 
> The Atmel SOC's are at91sam9261, at91sam9263 etc.
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
>  drivers/mfd/Kconfig            |  10 +++
>  drivers/mfd/Makefile           |   1 +
>  drivers/mfd/atmel-lcdc.c       | 158 +++++++++++++++++++++++++++++++++++
>  include/linux/mfd/atmel-lcdc.h | 184 +++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 353 insertions(+)
>  create mode 100644 drivers/mfd/atmel-lcdc.c
>  create mode 100644 include/linux/mfd/atmel-lcdc.h
> 
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index b860eb5aa194..f4851f0f033f 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -121,6 +121,16 @@ config MFD_ATMEL_HLCDC
>  	  additional drivers must be enabled in order to use the
>  	  functionality of the device.
>  
> +config MFD_ATMEL_LCDC
> +	tristate "Atmel LCDC (LCD Controller)"
> +	select MFD_CORE
> +	depends on OF
> +	help
> +	  If you say yes here you get support for the LCDC block.
> +	  This driver provides common support for accessing the device,
> +	  additional drivers must be enabled in order to use the
> +	  functionality of the device.
> +
>  config MFD_ATMEL_SMC
>  	bool
>  	select MFD_SYSCON
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index e9fd20dba18d..dba8465e0d96 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -186,6 +186,7 @@ obj-$(CONFIG_MFD_TPS65090)	+= tps65090.o
>  obj-$(CONFIG_MFD_AAT2870_CORE)	+= aat2870-core.o
>  obj-$(CONFIG_MFD_ATMEL_FLEXCOM)	+= atmel-flexcom.o
>  obj-$(CONFIG_MFD_ATMEL_HLCDC)	+= atmel-hlcdc.o
> +obj-$(CONFIG_MFD_ATMEL_LCDC)	+= atmel-lcdc.o
>  obj-$(CONFIG_MFD_ATMEL_SMC)	+= atmel-smc.o
>  obj-$(CONFIG_MFD_INTEL_LPSS)	+= intel-lpss.o
>  obj-$(CONFIG_MFD_INTEL_LPSS_PCI)	+= intel-lpss-pci.o
> diff --git a/drivers/mfd/atmel-lcdc.c b/drivers/mfd/atmel-lcdc.c
> new file mode 100644
> index 000000000000..8928976bafca
> --- /dev/null
> +++ b/drivers/mfd/atmel-lcdc.c
> @@ -0,0 +1,158 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (C) 2018 Sam Ravnborg
> + *
> + * Author: Sam Ravnborg <sam@ravnborg.org>
> + *
> + * Based on atmel-hlcdc.c wich is:
> + * Copyright (C) 2014 Free Electrons
> + * Copyright (C) 2014 Atmel
> + * Author: Boris BREZILLON <boris.brezillon@free-electrons.com>
> + */
> +
> +#include <linux/mfd/atmel-lcdc.h>
> +#include <linux/mfd/core.h>
> +#include <linux/module.h>
> +#include <linux/regmap.h>
> +#include <linux/clk.h>
> +#include <linux/io.h>
> +
> +#define ATMEL_LCDC_REG_MAX		(0x1000 - 0x4)
> +
> +struct lcdc_regmap {
> +	void __iomem *regs;
> +};
> +
> +static const struct mfd_cell lcdc_cells[] = {
> +	{
> +		.name = "atmel-lcdc-pwm",
> +		.of_compatible = "atmel,lcdc-pwm",
> +	},
> +	{
> +		.name = "atmel-lcdc-dc",
> +		.of_compatible = "atmel,lcdc-display-controller",
> +	},
> +};

Will you be adding any more devices, or is this the entirety of the
device?  If the latter, I suggest that this doesn't warrant being an
MFD.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1 3/7] mfd: add atmel-lcdc driver
Date: Wed, 15 Aug 2018 06:24:35 +0100	[thread overview]
Message-ID: <20180815052435.GA6412@dell> (raw)
In-Reply-To: <20180812184629.3808-3-sam@ravnborg.org>

On Sun, 12 Aug 2018, Sam Ravnborg wrote:

> The LCDC IP used by some Atmel SOC's have a
>     multifunction device that include two sub-devices:
>     - pwm
>     - display controller
> 
> This mfd device provide a regmap that can be used by the
> sub-devices to safely access the registers.
> The mfd device also support the clock used by the
> LCDC IP + a bus clock that in some cases are required.
> 
> The driver is based on the atmel-hlcdc driver.
> 
> The Atmel SOC's are at91sam9261, at91sam9263 etc.
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
>  drivers/mfd/Kconfig            |  10 +++
>  drivers/mfd/Makefile           |   1 +
>  drivers/mfd/atmel-lcdc.c       | 158 +++++++++++++++++++++++++++++++++++
>  include/linux/mfd/atmel-lcdc.h | 184 +++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 353 insertions(+)
>  create mode 100644 drivers/mfd/atmel-lcdc.c
>  create mode 100644 include/linux/mfd/atmel-lcdc.h
> 
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index b860eb5aa194..f4851f0f033f 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -121,6 +121,16 @@ config MFD_ATMEL_HLCDC
>  	  additional drivers must be enabled in order to use the
>  	  functionality of the device.
>  
> +config MFD_ATMEL_LCDC
> +	tristate "Atmel LCDC (LCD Controller)"
> +	select MFD_CORE
> +	depends on OF
> +	help
> +	  If you say yes here you get support for the LCDC block.
> +	  This driver provides common support for accessing the device,
> +	  additional drivers must be enabled in order to use the
> +	  functionality of the device.
> +
>  config MFD_ATMEL_SMC
>  	bool
>  	select MFD_SYSCON
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index e9fd20dba18d..dba8465e0d96 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -186,6 +186,7 @@ obj-$(CONFIG_MFD_TPS65090)	+= tps65090.o
>  obj-$(CONFIG_MFD_AAT2870_CORE)	+= aat2870-core.o
>  obj-$(CONFIG_MFD_ATMEL_FLEXCOM)	+= atmel-flexcom.o
>  obj-$(CONFIG_MFD_ATMEL_HLCDC)	+= atmel-hlcdc.o
> +obj-$(CONFIG_MFD_ATMEL_LCDC)	+= atmel-lcdc.o
>  obj-$(CONFIG_MFD_ATMEL_SMC)	+= atmel-smc.o
>  obj-$(CONFIG_MFD_INTEL_LPSS)	+= intel-lpss.o
>  obj-$(CONFIG_MFD_INTEL_LPSS_PCI)	+= intel-lpss-pci.o
> diff --git a/drivers/mfd/atmel-lcdc.c b/drivers/mfd/atmel-lcdc.c
> new file mode 100644
> index 000000000000..8928976bafca
> --- /dev/null
> +++ b/drivers/mfd/atmel-lcdc.c
> @@ -0,0 +1,158 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (C) 2018 Sam Ravnborg
> + *
> + * Author: Sam Ravnborg <sam@ravnborg.org>
> + *
> + * Based on atmel-hlcdc.c wich is:
> + * Copyright (C) 2014 Free Electrons
> + * Copyright (C) 2014 Atmel
> + * Author: Boris BREZILLON <boris.brezillon@free-electrons.com>
> + */
> +
> +#include <linux/mfd/atmel-lcdc.h>
> +#include <linux/mfd/core.h>
> +#include <linux/module.h>
> +#include <linux/regmap.h>
> +#include <linux/clk.h>
> +#include <linux/io.h>
> +
> +#define ATMEL_LCDC_REG_MAX		(0x1000 - 0x4)
> +
> +struct lcdc_regmap {
> +	void __iomem *regs;
> +};
> +
> +static const struct mfd_cell lcdc_cells[] = {
> +	{
> +		.name = "atmel-lcdc-pwm",
> +		.of_compatible = "atmel,lcdc-pwm",
> +	},
> +	{
> +		.name = "atmel-lcdc-dc",
> +		.of_compatible = "atmel,lcdc-display-controller",
> +	},
> +};

Will you be adding any more devices, or is this the entirety of the
device?  If the latter, I suggest that this doesn't warrant being an
MFD.

-- 
Lee Jones [???]
Linaro Services Technical Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  parent reply	other threads:[~2018-08-15  5:24 UTC|newest]

Thread overview: 100+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-12 18:41 [RFC PATCH 0/7] add at91sam9 LCDC DRM driver Sam Ravnborg
2018-08-12 18:41 ` Sam Ravnborg
2018-08-12 18:46 ` [PATCH v1 1/7] atmel-hlcdc: renamed directory to drm/atmel/ Sam Ravnborg
2018-08-12 18:46   ` Sam Ravnborg
2018-08-14  8:39   ` Daniel Vetter
2018-08-14  8:39     ` Daniel Vetter
2018-08-14 16:19     ` Sam Ravnborg
2018-08-14 16:19       ` Sam Ravnborg
2018-08-16  7:41       ` Daniel Vetter
2018-08-16  7:41         ` Daniel Vetter
2018-08-22 20:09         ` Sam Ravnborg
2018-08-22 20:09           ` Sam Ravnborg
2018-08-22 20:22           ` Daniel Vetter
2018-08-22 20:22             ` Daniel Vetter
2018-08-24  8:28   ` Boris Brezillon
2018-08-24  8:28     ` Boris Brezillon
2018-08-24 15:43     ` Sam Ravnborg
2018-08-24 15:43       ` Sam Ravnborg
2018-08-12 18:46 ` [PATCH v1 2/7] dt-binding: add bindings for Atmel LCDC mfd Sam Ravnborg
2018-08-12 18:46   ` Sam Ravnborg
2018-08-24  8:45   ` Boris Brezillon
2018-08-24  8:45     ` Boris Brezillon
2018-08-24 15:58     ` Sam Ravnborg
2018-08-24 15:58       ` Sam Ravnborg
2018-08-12 18:46 ` [PATCH v1 3/7] mfd: add atmel-lcdc driver Sam Ravnborg
2018-08-12 18:46   ` Sam Ravnborg
2018-08-14 11:09   ` kbuild test robot
2018-08-14 11:09     ` kbuild test robot
2018-08-15  5:24   ` Lee Jones [this message]
2018-08-15  5:24     ` Lee Jones
2018-08-15 20:40     ` Sam Ravnborg
2018-08-15 20:40       ` Sam Ravnborg
2018-08-16  8:28       ` Nicolas Ferre
2018-08-16  8:28         ` Nicolas Ferre
2018-08-16  8:42         ` Lee Jones
2018-08-16  8:42           ` Lee Jones
2018-08-24  8:37         ` Boris Brezillon
2018-08-24  8:37           ` Boris Brezillon
2018-08-24  8:15     ` Boris Brezillon
2018-08-24  8:15       ` Boris Brezillon
2018-08-24 10:58       ` Lee Jones
2018-08-24 10:58         ` Lee Jones
2018-08-15  8:11   ` kbuild test robot
2018-08-15  8:11     ` kbuild test robot
2018-08-24  8:48   ` Boris Brezillon
2018-08-24  8:48     ` Boris Brezillon
2018-08-12 18:46 ` [PATCH v1 4/7] dt-bindings: add bindings for Atmel LCDC pwm Sam Ravnborg
2018-08-12 18:46   ` Sam Ravnborg
2018-08-12 18:46 ` [PATCH v1 5/7] pwm: add pwm-atmel-lcdc driver Sam Ravnborg
2018-08-12 18:46   ` Sam Ravnborg
2018-08-12 18:46 ` [PATCH v1 6/7] dt-bindings: add bindings for Atmel lcdc-display-controller Sam Ravnborg
2018-08-12 18:46   ` Sam Ravnborg
2018-08-12 18:46 ` [PATCH v1 7/7] drm: add Atmel LCDC display controller support Sam Ravnborg
2018-08-12 18:46   ` Sam Ravnborg
2018-08-24 12:31   ` Boris Brezillon
2018-08-24 12:31     ` Boris Brezillon
2018-08-26 18:41     ` Sam Ravnborg
2018-08-26 18:41       ` Sam Ravnborg
2018-08-26 14:28   ` Noralf Trønnes
2018-08-26 14:28     ` Noralf Trønnes
2018-08-26 14:58     ` Sam Ravnborg
2018-08-26 14:58       ` Sam Ravnborg
2018-08-12 19:55 ` [RFC PATCH 0/7] add at91sam9 LCDC DRM driver Sam Ravnborg
2018-08-12 19:55   ` Sam Ravnborg
2018-08-13 14:47   ` Nicolas Ferre
2018-08-13 14:47     ` Nicolas Ferre
2018-08-14  8:41     ` Daniel Vetter
2018-08-14  8:41       ` Daniel Vetter
2018-08-22 20:12       ` Sam Ravnborg
2018-08-22 20:12         ` Sam Ravnborg
2018-08-23  6:16         ` Daniel Vetter
2018-08-23  6:16           ` Daniel Vetter
2018-08-13 15:54 ` Nicolas Ferre
2018-08-13 15:54   ` Nicolas Ferre
2018-08-13 18:18   ` Sam Ravnborg
2018-08-13 18:18     ` Sam Ravnborg
2018-08-13 22:04     ` Rob Herring
2018-08-13 22:04       ` Rob Herring
2018-08-14 16:43       ` Sam Ravnborg
2018-08-14 16:43         ` Sam Ravnborg
2018-08-14 22:42         ` Rob Herring
2018-08-14 22:42           ` Rob Herring
2018-08-15  4:48           ` Sam Ravnborg
2018-08-15  4:48             ` Sam Ravnborg
2018-08-15 14:45             ` Rob Herring
2018-08-15 14:45               ` Rob Herring
2018-08-15 15:04               ` Daniel Vetter
2018-08-15 15:04                 ` Daniel Vetter
2018-08-15 15:41                 ` Peter Rosin
2018-08-15 15:41                   ` Peter Rosin
2018-08-15 20:48                   ` Sam Ravnborg
2018-08-15 20:48                     ` Sam Ravnborg
2018-08-14 14:36     ` Alexandre Belloni
2018-08-14 14:36       ` Alexandre Belloni
2018-08-14 16:16       ` Sam Ravnborg
2018-08-14 16:16         ` Sam Ravnborg
2018-08-24  8:22 ` Boris Brezillon
2018-08-24  8:22   ` Boris Brezillon
2018-08-24 15:52   ` Sam Ravnborg
2018-08-24 15:52     ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180815052435.GA6412@dell \
    --to=lee.jones@linaro.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=boris.brezillon@bootlin.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=robh+dt@kernel.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.