public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: linux-kernel@vger.kernel.org, sameo@linux.intel.com,
	lee.jones@linaro.org, jdelvare@suse.de,
	linux-i2c@vger.kernel.org, wim@iguana.be,
	linux-watchdog@vger.kernel.org, jingoohan1@gmail.com,
	Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH 2/4] i2c: Add Congatec CGEB I2C driver
Date: Fri, 12 Jun 2015 20:05:38 +0900	[thread overview]
Message-ID: <20150612110537.GA4009@katana> (raw)
In-Reply-To: <1434055734-3602-3-git-send-email-christian.gmeiner@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]


Oh, this one again. Like last time, close to be ready.

> +#include <linux/module.h>
> +#include <linux/platform_device.h>
> +#include <linux/slab.h>
> +#include <linux/i2c.h>
> +#include <linux/mfd/congatec-cgeb.h>

Please sort the includes.

> +struct cgeb_i2c_priv {
> +	struct cgeb_board_data          *board;
> +	struct i2c_adapter      adapter;
> +	int unit;
> +};

Only a single space for indentation

> +	ret = cgeb_i2c_set_speed(priv, 400000);

Not all slaves handle 400kHz. So, this might be a bit demanding. Then
again, it is probably fix which slaves are connected and they work
currently?

> +		/*
> +		 * not a critical error, we can continue with the default speed.
> +		 */

Single line comment, even if it is a little over 80 chars

> +	platform_set_drvdata(pdev, NULL);

Not needed.

> +
> +static struct platform_driver cgeb_i2c_driver = {
> +	.probe          = cgeb_i2c_probe,
> +	.remove         = __exit_p(cgeb_i2c_remove),

Leftover annotation?

> +	.driver = {
> +		.name   = "cgeb-i2c",
> +		.owner  = THIS_MODULE,

Owner not needed

> +	},
> +};
> +
> +static int __init cgeb_i2c_driver_init(void)
> +{
> +	return platform_driver_register(&cgeb_i2c_driver);
> +}
> +
> +static void __exit cgeb_i2c_driver_exit(void)
> +{
> +	platform_driver_unregister(&cgeb_i2c_driver);
> +}
> +
> +module_init(cgeb_i2c_driver_init);
> +module_exit(cgeb_i2c_driver_exit);

module_platform_driver?

> +
> +MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
> +MODULE_DESCRIPTION("cgeb i2c driver");
> +MODULE_LICENSE("GPL");

GPL v2


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-06-12 11:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 20:48 [PATCH 0/4] Add support for Congatec CGEB BIOS interface Christian Gmeiner
2015-06-11 20:48 ` [PATCH 1/4] x86: Add basic support for the " Christian Gmeiner
2015-06-12  9:35   ` Paul Bolle
2015-06-15  7:24     ` Christian Gmeiner
2015-06-11 20:48 ` [PATCH 2/4] i2c: Add Congatec CGEB I2C driver Christian Gmeiner
2015-06-12 11:05   ` Wolfram Sang [this message]
2015-06-11 20:48 ` [PATCH 3/4] watchdog: Add Congatec CGEB watchdog driver Christian Gmeiner
2015-06-11 22:04   ` Guenter Roeck
2015-06-11 20:48 ` [PATCH 4/4] backlight: Add Congatec CGEB backlight driver Christian Gmeiner

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=20150612110537.GA4009@katana \
    --to=wsa@the-dreams.de \
    --cc=christian.gmeiner@gmail.com \
    --cc=jdelvare@suse.de \
    --cc=jingoohan1@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sameo@linux.intel.com \
    --cc=wim@iguana.be \
    /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