From: Varka Bhadram <varkabhadram@gmail.com>
To: Matthias Brugger <matthias.bgg@gmail.com>, linux-kernel@vger.kernel.org
Cc: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
rdunlap@infradead.org, gregkh@linuxfoundation.org,
jslaby@suse.cz, grant.likely@linaro.org,
heikki.krogerus@linux.intel.com, alan@linux.intel.com,
paul.gortmaker@windriver.com, asierra@xes-inc.com,
mwelling@ieee.org, dianders@chromium.org, m-karicheri2@ti.com,
jschultz@xes-inc.com, mingo@elte.hu, balbi@ti.com,
heiko@sntech.de, devicetree@vger.kernel.org,
linux-doc@vger.kernel.org, linux-serial@vger.kernel.org,
linux-api@vger.kernel.org
Subject: Re: [PATCH 2/3] tty: serial: 8250: Add Mediatek UART driver
Date: Tue, 05 Aug 2014 17:25:31 +0530 [thread overview]
Message-ID: <53E0C633.7060600@gmail.com> (raw)
In-Reply-To: <1407236054-30994-3-git-send-email-matthias.bgg@gmail.com>
On 08/05/2014 04:24 PM, Matthias Brugger wrote:
(...)
> +#include <linux/io.h>
> +#include <linux/module.h>
> +#include <linux/serial_8250.h>
> +#include <linux/of_irq.h>
> +#include <linux/of_platform.h>
> +#include <linux/platform_device.h>
> +#include <linux/clk.h>
> +#include <linux/pm_runtime.h>
> +#include "8250.h"
> +
Better if we have includes in alphabetical order..
> +#define MTK_UART_RATE_FIX 0x0D /* UART Rate Fix Register */
> +
> +struct mtk8250_data {
> + int line;
> + struct clk *clk;
> +};
> +
> +static void
> +mtk8250_do_pm(struct uart_port *port, unsigned int state, unsigned int old)
> +{
> + if (!state)
> + pm_runtime_get_sync(port->dev);
> +
> + serial8250_do_pm(port, state, old);
> +
> + if (state)
> + pm_runtime_put_sync_suspend(port->dev);
> +}
> +
> +static int mtk8250_probe_of(struct uart_port *p,
> + struct mtk8250_data *data)
static int mtk8250_probe_of(struct uart_port *p,
struct mtk8250_data *data)
> +{
> + int err;
> + struct device_node *np = p->dev->of_node;
> +
> + data->clk = of_clk_get(np, 0);
> + if (IS_ERR(data->clk)) {
> + pr_warn("Can't get timer clock");
missed terminating new line...
> + return PTR_ERR(data->clk);
> + }
> +
> + err = clk_prepare_enable(data->clk);
> + if (err) {
> + pr_warn("Can't prepare clock");
same...
> + clk_put(data->clk);
> + return err;
> + }
> + p->uartclk = clk_get_rate(data->clk);
> +
> + return 0;
> +}
(...)
> +static struct platform_driver mtk8250_platform_driver = {
> + .driver = {
> + .name = "mt6577-uart",
> + .owner = THIS_MODULE,
No need to update this field...
> + .pm = &mtk8250_pm_ops,
> + .of_match_table = mtk8250_of_match,
> + },
> + .probe = mtk8250_probe,
> + .remove = mtk8250_remove,
> +};
> +module_platform_driver(mtk8250_platform_driver);
>
--
Regards,
Varka Bhadram.
next prev parent reply other threads:[~2014-08-05 11:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-05 10:54 [PATCH 0/3] tty: serial: Add mediatek UART driver Matthias Brugger
2014-08-05 10:54 ` [PATCH 1/3] tty: serial: 8250: Add new capability for highspeed register Matthias Brugger
[not found] ` <1407236054-30994-2-git-send-email-matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-05 11:43 ` One Thousand Gnomes
2014-08-05 10:54 ` [PATCH 2/3] tty: serial: 8250: Add Mediatek UART driver Matthias Brugger
2014-08-05 11:55 ` Varka Bhadram [this message]
2014-08-05 12:02 ` Alan Cox
[not found] ` <1407240147.30675.29.camel-wU3TRTJX3O1FGiH78xh5akvbDziVy8sZEvhb3Hwu1Ks@public.gmane.org>
2014-08-05 12:04 ` Varka Bhadram
[not found] ` <53E0C839.3000808-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-05 13:38 ` Alan Cox
2014-08-05 10:54 ` [PATCH 3/3] DTS: serial: Add bindings documention for the Mediatek UARTs Matthias Brugger
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=53E0C633.7060600@gmail.com \
--to=varkabhadram@gmail.com \
--cc=alan@linux.intel.com \
--cc=asierra@xes-inc.com \
--cc=balbi@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=heiko@sntech.de \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jschultz@xes-inc.com \
--cc=jslaby@suse.cz \
--cc=linux-api@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=m-karicheri2@ti.com \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=mingo@elte.hu \
--cc=mwelling@ieee.org \
--cc=paul.gortmaker@windriver.com \
--cc=pawel.moll@arm.com \
--cc=rdunlap@infradead.org \
--cc=robh+dt@kernel.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 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).