linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Varka Bhadram <varkabhadram@gmail.com>
To: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>,
	Lee Jones <lee.jones@linaro.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Jonathan Cameron <jic23@kernel.org>,
	linux-iio@vger.kernel.org, Sebastian Reichel <sre@kernel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-pm@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	devicetree@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, support.opensource@diasemi.com
Subject: Re: [PATCH v2 1/7] mfd: Add support for DA9150 combined charger & fuel-gauge device
Date: Thu, 28 Aug 2014 17:17:08 +0530	[thread overview]
Message-ID: <53FF16BC.9050701@gmail.com> (raw)
In-Reply-To: <d6c7de200c9447dbafa74ee76739da943a0b73b2.1409145187.git.Adam.Thomson.Opensource@diasemi.com>

On 08/28/2014 04:18 PM, Adam Thomson wrote:

(...)

> +static int da9150_probe(struct i2c_client *client,
> +			const struct i2c_device_id *id)
> +{
> +	struct da9150 *da9150;
> +	int ret;
> +
> +	da9150 = devm_kzalloc(&client->dev, sizeof(struct da9150), GFP_KERNEL);
> +	if (da9150 == NULL)
> +		return -ENOMEM;

da9150 = devm_kzalloc(&client->dev, sizeof(*da9150), GFP_KERNEL);
if (!da9150)
	return -ENOMEM;

> +	da9150->dev = &client->dev;
> +	da9150->irq = client->irq;
> +	i2c_set_clientdata(client, da9150);
> +	dev_set_drvdata(da9150->dev, da9150);
> +
> +	da9150->regmap = devm_regmap_init_i2c(client, &da9150_regmap_config);
> +	if (IS_ERR(da9150->regmap)) {
> +		ret = PTR_ERR(da9150->regmap);
> +		dev_err(da9150->dev, "Failed to allocate register map: %d\n",
> +			ret);
> +		return ret;
> +	}
> +
> +	return da9150_device_init(da9150);
> +}
> +
> +static int da9150_remove(struct i2c_client *client)
> +{
> +	struct da9150 *da9150 = i2c_get_clientdata(client);
> +
> +	da9150_device_exit(da9150);
> +
> +	return 0;
> +}
> +
> +static void da9150_shutdown(struct i2c_client *client)
> +{
> +	struct da9150 *da9150 = i2c_get_clientdata(client);
> +
> +	da9150_device_shutdown(da9150);
> +}
> +
> +static const struct i2c_device_id da9150_i2c_id[] = {
> +	{ "da9150", 0 },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(i2c, da9150_i2c_id);
> +
> +static const struct of_device_id da9150_of_match[] = {
> +	{ .compatible = "dlg,da9150", },
> +	{ }
> +};
> +

missed MODULE_DEVICE_TABLE(of, ...)   ?

> +static struct i2c_driver da9150_driver = {
> +	.driver	= {
> +		.name	= "da9150",
> +		.owner	= THIS_MODULE,

No need to update this field...

> +		.of_match_table = of_match_ptr(da9150_of_match),
> +	},
> +	.probe		= da9150_probe,
> +	.remove		= da9150_remove,
> +	.shutdown	= da9150_shutdown,
> +	.id_table	= da9150_i2c_id,
> +};
> +
> +module_i2c_driver(da9150_driver);
> +
> +MODULE_DESCRIPTION("I2C Driver for DA9150");
> +MODULE_AUTHOR("Adam Thomson <Adam.Thomson.Opensource@diasemi.com");
> +MODULE_LICENSE("GPL");
>
-- 
Regards,
Varka Bhadram.


  reply	other threads:[~2014-08-28 11:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28 10:48 [PATCH v2 0/7] Add initial support for DA9150 Charger & Fuel-Gauge IC Adam Thomson
2014-08-28 10:48 ` [PATCH v2 1/7] mfd: Add support for DA9150 combined charger & fuel-gauge device Adam Thomson
2014-08-28 11:47   ` Varka Bhadram [this message]
2014-09-09 10:32     ` Opensource [Adam Thomson]
2014-09-10  9:51       ` Lee Jones
2014-08-28 16:36   ` Lee Jones
2014-09-09 10:37     ` Opensource [Adam Thomson]
2014-09-10  9:49       ` Lee Jones
2014-09-10 15:58         ` Opensource [Adam Thomson]
2014-09-15 22:39           ` Lee Jones
2014-09-16 10:50             ` Opensource [Adam Thomson]
2014-09-16 22:07               ` Lee Jones
2014-08-28 10:48 ` [PATCH v2 2/7] mfd: da9150: Add DT binding documentation for core Adam Thomson
2014-08-28 10:48 ` [PATCH v2 3/7] iio: Add support for DA9150 GPADC Adam Thomson
2014-08-28 11:28   ` Peter Meerwald
2014-08-30 20:01     ` Jonathan Cameron
2014-09-09 10:53       ` Opensource [Adam Thomson]
2014-09-14 17:26         ` Jonathan Cameron
2014-09-15 10:32           ` Opensource [Adam Thomson]
2014-09-09 10:51     ` Opensource [Adam Thomson]
2014-08-28 10:49 ` [PATCH v2 4/7] iio: da9150: Add DT binding documentation for GPADC Adam Thomson
2014-08-28 10:49 ` [PATCH v2 5/7] power: Add support for DA9150 Charger Adam Thomson
2014-08-28 10:49 ` [PATCH v2 6/7] power: da9150: Add DT binding documentation for charger Adam Thomson
2014-08-28 10:49 ` [PATCH v2 7/7] MAINTAINERS: Include DA9150 files in Dialog Semiconductor support list Adam Thomson
2014-08-28 11:17   ` Lee Jones

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=53FF16BC.9050701@gmail.com \
    --to=varkabhadram@gmail.com \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=akpm@linux-foundation.org \
    --cc=dbaryshkov@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jic23@kernel.org \
    --cc=joe@perches.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=sre@kernel.org \
    --cc=support.opensource@diasemi.com \
    /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).