All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linuxppc-dev@ozlabs.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: Driver to expose PowerNV platform i2c busses
Date: Fri, 14 Nov 2014 21:40:02 +0530	[thread overview]
Message-ID: <5466295A.1040005@linux.vnet.ibm.com> (raw)
In-Reply-To: <20141113075817.GA1288@katana>


[-- Attachment #1.1: Type: text/plain, Size: 3311 bytes --]


On 11/13/2014 01:28 PM, Wolfram Sang wrote:
> Hi,
>
> I am basically fine if this goes via the powerpc-tree and I was hoping
> that I could ack it right now. However, the driver looks a bit rushed
> and definately needs updates before it is ready to go.
>
> On Mon, Nov 10, 2014 at 11:35:39AM +0530, Neelesh Gupta wrote:
>> The patch exposes the available i2c busses on the PowerNV platform
>> to the kernel and implements the bus driver to support i2c and
>> smbus commands.
>> The driver uses the platform device infrastructure to probe the busses
>> on the platform and registers them with the i2c driver framework.
>>
>> Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
>> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Review for the I2C parts:
>
>> diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
>> index 78d56c5..350aa86 100644
>> --- a/drivers/i2c/busses/Makefile
>> +++ b/drivers/i2c/busses/Makefile
>> @@ -102,5 +102,6 @@ obj-$(CONFIG_I2C_ELEKTOR)	+= i2c-elektor.o
>>   obj-$(CONFIG_I2C_PCA_ISA)	+= i2c-pca-isa.o
>>   obj-$(CONFIG_I2C_SIBYTE)	+= i2c-sibyte.o
>>   obj-$(CONFIG_SCx200_ACB)	+= scx200_acb.o
>> +obj-$(CONFIG_I2C_OPAL)		+= i2c-opal.o
> Please sort it properly, not simply at the end.

I don't find match under any 'comment' in this file so keeping it under
"Other I2C/SMBus bus drivers".

>
>>   
>>   ccflags-$(CONFIG_I2C_DEBUG_BUS) := -DDEBUG
>> diff --git a/drivers/i2c/busses/i2c-opal.c b/drivers/i2c/busses/i2c-opal.c
>> new file mode 100644
>> index 0000000..3261716
>> --- /dev/null
>> +++ b/drivers/i2c/busses/i2c-opal.c
>> +
>> +	return rc;
>> +}
>> +
>> +static int i2c_opal_remove(struct platform_device *pdev)
>> +{
>> +	struct i2c_adapter *adapter = platform_get_drvdata(pdev);
>> +
>> +	i2c_del_adapter(adapter);
>> +
>> +	kfree(adapter);
>> +
>> +	return 0;
>> +}
>> +
>> +static const struct of_device_id i2c_opal_of_match[] = {
>> +	{
>> +		.compatible = "ibm,power8-i2c-port",
>> +	},
>> +	{ }
>> +};
>> +MODULE_DEVICE_TABLE(of, i2c_opal_of_match);
>> +
>> +static struct platform_driver i2c_opal_driver = {
>> +	.probe	= i2c_opal_probe,
>> +	.remove	= i2c_opal_remove,
>> +	.driver	= {
>> +		.name		= "i2c-opal",
>> +		.owner		= THIS_MODULE,
> Not needed.

I didn't get this.

>
>> +		.of_match_table	= i2c_opal_of_match,
>> +	},
>> +};
>> +
>> +static int __init i2c_opal_init(void)
>> +{
>> +	if (!firmware_has_feature(FW_FEATURE_OPAL))
>> +		return -ENODEV;
>> +
>> +	return platform_driver_register(&i2c_opal_driver);
>> +}
>> +
>> +static void __exit i2c_opal_exit(void)
>> +{
>> +	return platform_driver_unregister(&i2c_opal_driver);
>> +}
>> +
>> +MODULE_AUTHOR("Neelesh Gupta <neelegup@linux.vnet.ibm.com>");
>> +MODULE_DESCRIPTION("IBM OPAL I2C driver");
>> +MODULE_LICENSE("GPL");
>> +
>> +module_init(i2c_opal_init);
>> +module_exit(i2c_opal_exit);
> Please put thos right below the functions it references.

Okay.

- Neelesh
>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>
>> _______________________________________________
>> Linuxppc-dev mailing list
>> Linuxppc-dev@lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/linuxppc-dev


[-- Attachment #1.2: Type: text/html, Size: 5015 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

WARNING: multiple messages have this Message-ID (diff)
From: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linuxppc-dev@ozlabs.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: Driver to expose PowerNV platform i2c busses
Date: Fri, 14 Nov 2014 21:40:02 +0530	[thread overview]
Message-ID: <5466295A.1040005@linux.vnet.ibm.com> (raw)
In-Reply-To: <20141113075817.GA1288@katana>

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


On 11/13/2014 01:28 PM, Wolfram Sang wrote:
> Hi,
>
> I am basically fine if this goes via the powerpc-tree and I was hoping
> that I could ack it right now. However, the driver looks a bit rushed
> and definately needs updates before it is ready to go.
>
> On Mon, Nov 10, 2014 at 11:35:39AM +0530, Neelesh Gupta wrote:
>> The patch exposes the available i2c busses on the PowerNV platform
>> to the kernel and implements the bus driver to support i2c and
>> smbus commands.
>> The driver uses the platform device infrastructure to probe the busses
>> on the platform and registers them with the i2c driver framework.
>>
>> Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
>> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Review for the I2C parts:
>
>> diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
>> index 78d56c5..350aa86 100644
>> --- a/drivers/i2c/busses/Makefile
>> +++ b/drivers/i2c/busses/Makefile
>> @@ -102,5 +102,6 @@ obj-$(CONFIG_I2C_ELEKTOR)	+= i2c-elektor.o
>>   obj-$(CONFIG_I2C_PCA_ISA)	+= i2c-pca-isa.o
>>   obj-$(CONFIG_I2C_SIBYTE)	+= i2c-sibyte.o
>>   obj-$(CONFIG_SCx200_ACB)	+= scx200_acb.o
>> +obj-$(CONFIG_I2C_OPAL)		+= i2c-opal.o
> Please sort it properly, not simply at the end.

I don't find match under any 'comment' in this file so keeping it under
"Other I2C/SMBus bus drivers".

>
>>   
>>   ccflags-$(CONFIG_I2C_DEBUG_BUS) := -DDEBUG
>> diff --git a/drivers/i2c/busses/i2c-opal.c b/drivers/i2c/busses/i2c-opal.c
>> new file mode 100644
>> index 0000000..3261716
>> --- /dev/null
>> +++ b/drivers/i2c/busses/i2c-opal.c
>> +
>> +	return rc;
>> +}
>> +
>> +static int i2c_opal_remove(struct platform_device *pdev)
>> +{
>> +	struct i2c_adapter *adapter = platform_get_drvdata(pdev);
>> +
>> +	i2c_del_adapter(adapter);
>> +
>> +	kfree(adapter);
>> +
>> +	return 0;
>> +}
>> +
>> +static const struct of_device_id i2c_opal_of_match[] = {
>> +	{
>> +		.compatible = "ibm,power8-i2c-port",
>> +	},
>> +	{ }
>> +};
>> +MODULE_DEVICE_TABLE(of, i2c_opal_of_match);
>> +
>> +static struct platform_driver i2c_opal_driver = {
>> +	.probe	= i2c_opal_probe,
>> +	.remove	= i2c_opal_remove,
>> +	.driver	= {
>> +		.name		= "i2c-opal",
>> +		.owner		= THIS_MODULE,
> Not needed.

I didn't get this.

>
>> +		.of_match_table	= i2c_opal_of_match,
>> +	},
>> +};
>> +
>> +static int __init i2c_opal_init(void)
>> +{
>> +	if (!firmware_has_feature(FW_FEATURE_OPAL))
>> +		return -ENODEV;
>> +
>> +	return platform_driver_register(&i2c_opal_driver);
>> +}
>> +
>> +static void __exit i2c_opal_exit(void)
>> +{
>> +	return platform_driver_unregister(&i2c_opal_driver);
>> +}
>> +
>> +MODULE_AUTHOR("Neelesh Gupta <neelegup@linux.vnet.ibm.com>");
>> +MODULE_DESCRIPTION("IBM OPAL I2C driver");
>> +MODULE_LICENSE("GPL");
>> +
>> +module_init(i2c_opal_init);
>> +module_exit(i2c_opal_exit);
> Please put thos right below the functions it references.

Okay.

- Neelesh
>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>
>> _______________________________________________
>> Linuxppc-dev mailing list
>> Linuxppc-dev@lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/linuxppc-dev


[-- Attachment #2: Type: text/html, Size: 5015 bytes --]

  parent reply	other threads:[~2014-11-14 16:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10  6:05 [PATCH] i2c: Driver to expose PowerNV platform i2c busses Neelesh Gupta
2014-11-10  6:05 ` Neelesh Gupta
     [not found] ` <20141110060424.9407.2498.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-11-12  6:07   ` Benjamin Herrenschmidt
2014-11-12  6:07     ` Benjamin Herrenschmidt
     [not found]     ` <1415772441.5124.39.camel-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2014-11-13  5:36       ` Michael Ellerman
2014-11-13  5:36         ` Michael Ellerman
2014-11-13  7:58   ` Wolfram Sang
2014-11-13  7:58     ` Wolfram Sang
2014-11-13 10:56     ` Benjamin Herrenschmidt
2014-11-13 10:56       ` Benjamin Herrenschmidt
2014-11-13 12:40       ` Benjamin Herrenschmidt
2014-11-13 12:40         ` Benjamin Herrenschmidt
     [not found]         ` <1415882455.666.4.camel-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2014-11-13 18:08           ` Neelesh Gupta
2014-11-13 18:08             ` Neelesh Gupta
     [not found]       ` <1415876169.666.2.camel-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2014-11-13 13:10         ` Wolfram Sang
2014-11-13 13:10           ` Wolfram Sang
2014-11-13 20:53           ` Benjamin Herrenschmidt
2014-11-13 20:53             ` Benjamin Herrenschmidt
     [not found]             ` <1415912020.666.17.camel-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2014-11-14  5:17               ` Benjamin Herrenschmidt
2014-11-14  5:17                 ` Benjamin Herrenschmidt
2014-11-14 16:10     ` Neelesh Gupta [this message]
2014-11-14 16:10       ` Neelesh Gupta

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=5466295A.1040005@linux.vnet.ibm.com \
    --to=neelegup@linux.vnet.ibm.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=wsa@the-dreams.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.