From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: Christian Gmeiner
<christian.gmeiner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
jdelvare-l3A5Bk7waGM@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org,
linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
jingoohan1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1574 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-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>");
> +MODULE_DESCRIPTION("cgeb i2c driver");
> +MODULE_LICENSE("GPL");
GPL v2
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent 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
[not found] ` <1434055734-3602-2-git-send-email-christian.gmeiner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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
[not found] ` <1434055734-3602-3-git-send-email-christian.gmeiner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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
[not found] ` <1434055734-3602-4-git-send-email-christian.gmeiner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-11 22:04 ` Guenter Roeck
[not found] ` <1434055734-3602-1-git-send-email-christian.gmeiner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
--cc=christian.gmeiner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jdelvare-l3A5Bk7waGM@public.gmane.org \
--cc=jingoohan1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.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).