LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Radu Pirea <radu.pirea@microchip.com>
Cc: Mark Brown <broonie@kernel.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	alexandre.belloni@bootlin.com, Lee Jones <lee.jones@linaro.org>,
	Richard Genoud <richard.genoud@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-spi <linux-spi@vger.kernel.org>,
	linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>
Subject: Re: [PATCH v4 3/6] mfd: at91-usart: added mfd driver for usart
Date: Mon, 28 May 2018 11:00:49 +0300	[thread overview]
Message-ID: <CAHp75VeeiFhShuMOVzuy2FjxrkfsxxzhyfAnwQNOoeaRwZ103Q@mail.gmail.com> (raw)
In-Reply-To: <20180525171941.26766-4-radu.pirea@microchip.com>

On Fri, May 25, 2018 at 8:19 PM, Radu Pirea <radu.pirea@microchip.com> wrote:
> This mfd driver is just a wrapper over atmel_serial driver and
> spi-at91-usart driver. Selection of one of the drivers is based on a
> property from device tree. If the property is not specified, the default
> driver is atmel_serial.

> +       depends on OF

What makes this driver OF specific?

> +#include <linux/of.h>
> +#include <linux/of_platform.h>

Ditto.

> +#include <linux/pinctrl/pinctrl.h>

How exactly is this used?

> +#include <linux/platform_device.h>

> +#include <linux/slab.h>

Ditto.

> +#include <linux/types.h>

> +static int at91_usart_mode_probe(struct platform_device *pdev)
> +{
> +       struct device_node *np = pdev->dev.of_node;
> +       struct mfd_cell cell;
> +       u32 opmode;
> +       int err;
> +

> +       err = of_property_read_u32(np, "atmel,usart-mode", &opmode);

Check unified device property API.

> +       return mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, &cell, 1,
> +                             NULL, 0, NULL);

No devm_ and no ->remove(). Why to leak resources?

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2018-05-28  8:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 17:19 [PATCH v4 0/6] Driver for at91 usart in spi mode Radu Pirea
2018-05-25 17:19 ` [PATCH v4 1/6] MAINTAINERS: add at91 usart mfd driver Radu Pirea
2018-05-25 17:19 ` [PATCH v4 2/6] dt-bindings: add binding for atmel-usart in SPI mode Radu Pirea
2018-05-31  1:00   ` Rob Herring
2018-06-13  6:11   ` Lee Jones
2018-05-25 17:19 ` [PATCH v4 3/6] mfd: at91-usart: added mfd driver for usart Radu Pirea
2018-05-28  8:00   ` Andy Shevchenko [this message]
2018-05-29  9:32     ` Alexandre Belloni
2018-05-31  1:02   ` Rob Herring
2018-05-25 17:19 ` [PATCH v4 4/6] MAINTAINERS: add at91 usart spi driver Radu Pirea
2018-05-25 17:19 ` [PATCH v4 5/6] spi: at91-usart: add driver for at91-usart as spi Radu Pirea
2018-05-28  8:21   ` Andy Shevchenko
2018-05-29 14:28     ` Radu Pirea
2018-05-29 14:34       ` Nicolas Ferre
2018-05-29 14:36         ` Nicolas Ferre
2018-05-25 17:19 ` [PATCH v4 6/6] tty/serial: atmel: changed the driver to work under at91-usart mfd Radu Pirea
2018-05-28 10:08   ` Richard Genoud
2018-05-29  9:15     ` Radu Pirea

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=CAHp75VeeiFhShuMOVzuy2FjxrkfsxxzhyfAnwQNOoeaRwZ103Q@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=radu.pirea@microchip.com \
    --cc=richard.genoud@gmail.com \
    --cc=robh+dt@kernel.org \
    --subject='Re: [PATCH v4 3/6] mfd: at91-usart: added mfd driver for usart' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).