* [PATCH v2] ARM: davinci: use simple i2c probe function
@ 2020-08-09 17:24 Stephen Kitt
2020-08-10 9:37 ` Wolfram Sang
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Stephen Kitt @ 2020-08-09 17:24 UTC (permalink / raw)
To: Sekhar Nori, Bartosz Golaszewski, Russell King, linux-arm-kernel
Cc: linux-i2c, linux-kernel, Stephen Kitt
The i2c probe functions here don't use the id information provided in
their second argument, so the single-parameter i2c probe function
("probe_new") can be used instead.
This avoids scanning the identifier tables during probes.
Signed-off-by: Stephen Kitt <steve@sk2.org>
---
Changes since v1:
- split into per-sub-architecture patches.
arch/arm/mach-davinci/board-dm644x-evm.c | 5 ++---
arch/arm/mach-davinci/board-dm646x-evm.c | 10 ++++------
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index a5d3708fedf6..d0dcf69cc76d 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -548,8 +548,7 @@ static const struct property_entry eeprom_properties[] = {
*/
static struct i2c_client *dm6446evm_msp;
-static int dm6446evm_msp_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int dm6446evm_msp_probe(struct i2c_client *client)
{
dm6446evm_msp = client;
return 0;
@@ -569,7 +568,7 @@ static const struct i2c_device_id dm6446evm_msp_ids[] = {
static struct i2c_driver dm6446evm_msp_driver = {
.driver.name = "dm6446evm_msp",
.id_table = dm6446evm_msp_ids,
- .probe = dm6446evm_msp_probe,
+ .probe_new = dm6446evm_msp_probe,
.remove = dm6446evm_msp_remove,
};
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index 4600b617f9b4..2dce16fff77e 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -160,8 +160,7 @@ static struct platform_device davinci_aemif_device = {
#define DM646X_EVM_ATA_PWD BIT(1)
/* CPLD Register 0 Client: used for I/O Control */
-static int cpld_reg0_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int cpld_reg0_probe(struct i2c_client *client)
{
if (HAS_ATA) {
u8 data;
@@ -197,7 +196,7 @@ static const struct i2c_device_id cpld_reg_ids[] = {
static struct i2c_driver dm6467evm_cpld_driver = {
.driver.name = "cpld_reg0",
.id_table = cpld_reg_ids,
- .probe = cpld_reg0_probe,
+ .probe_new = cpld_reg0_probe,
};
/* LEDS */
@@ -402,8 +401,7 @@ static struct snd_platform_data dm646x_evm_snd_data[] = {
#ifdef CONFIG_I2C
static struct i2c_client *cpld_client;
-static int cpld_video_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int cpld_video_probe(struct i2c_client *client)
{
cpld_client = client;
return 0;
@@ -424,7 +422,7 @@ static struct i2c_driver cpld_video_driver = {
.driver = {
.name = "cpld_video",
},
- .probe = cpld_video_probe,
+ .probe_new = cpld_video_probe,
.remove = cpld_video_remove,
.id_table = cpld_video_id,
};
base-commit: bcf876870b95592b52519ed4aafcf9d95999bc9c
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ARM: davinci: use simple i2c probe function
2020-08-09 17:24 [PATCH v2] ARM: davinci: use simple i2c probe function Stephen Kitt
@ 2020-08-10 9:37 ` Wolfram Sang
2020-09-03 5:38 ` Sekhar Nori
2020-08-10 18:47 ` Bartosz Golaszewski
2020-08-13 13:08 ` Luca Ceresoli
2 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2020-08-10 9:37 UTC (permalink / raw)
To: Stephen Kitt
Cc: Sekhar Nori, Bartosz Golaszewski, Russell King, linux-arm-kernel,
linux-i2c, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 463 bytes --]
On Sun, Aug 09, 2020 at 07:24:44PM +0200, Stephen Kitt wrote:
> The i2c probe functions here don't use the id information provided in
> their second argument, so the single-parameter i2c probe function
> ("probe_new") can be used instead.
>
> This avoids scanning the identifier tables during probes.
>
> Signed-off-by: Stephen Kitt <steve@sk2.org>
This is useful, helps deprecating the old probe method:
Acked-by: Wolfram Sang <wsa@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ARM: davinci: use simple i2c probe function
2020-08-09 17:24 [PATCH v2] ARM: davinci: use simple i2c probe function Stephen Kitt
2020-08-10 9:37 ` Wolfram Sang
@ 2020-08-10 18:47 ` Bartosz Golaszewski
2020-08-13 13:08 ` Luca Ceresoli
2 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2020-08-10 18:47 UTC (permalink / raw)
To: Stephen Kitt; +Cc: Sekhar Nori, Russell King, arm-soc, linux-i2c, LKML
On Sun, Aug 9, 2020 at 7:24 PM Stephen Kitt <steve@sk2.org> wrote:
>
> The i2c probe functions here don't use the id information provided in
> their second argument, so the single-parameter i2c probe function
> ("probe_new") can be used instead.
>
> This avoids scanning the identifier tables during probes.
>
> Signed-off-by: Stephen Kitt <steve@sk2.org>
> ---
> Changes since v1:
> - split into per-sub-architecture patches.
>
> arch/arm/mach-davinci/board-dm644x-evm.c | 5 ++---
> arch/arm/mach-davinci/board-dm646x-evm.c | 10 ++++------
> 2 files changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
> index a5d3708fedf6..d0dcf69cc76d 100644
> --- a/arch/arm/mach-davinci/board-dm644x-evm.c
> +++ b/arch/arm/mach-davinci/board-dm644x-evm.c
> @@ -548,8 +548,7 @@ static const struct property_entry eeprom_properties[] = {
> */
> static struct i2c_client *dm6446evm_msp;
>
> -static int dm6446evm_msp_probe(struct i2c_client *client,
> - const struct i2c_device_id *id)
> +static int dm6446evm_msp_probe(struct i2c_client *client)
> {
> dm6446evm_msp = client;
> return 0;
> @@ -569,7 +568,7 @@ static const struct i2c_device_id dm6446evm_msp_ids[] = {
> static struct i2c_driver dm6446evm_msp_driver = {
> .driver.name = "dm6446evm_msp",
> .id_table = dm6446evm_msp_ids,
> - .probe = dm6446evm_msp_probe,
> + .probe_new = dm6446evm_msp_probe,
> .remove = dm6446evm_msp_remove,
> };
>
> diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
> index 4600b617f9b4..2dce16fff77e 100644
> --- a/arch/arm/mach-davinci/board-dm646x-evm.c
> +++ b/arch/arm/mach-davinci/board-dm646x-evm.c
> @@ -160,8 +160,7 @@ static struct platform_device davinci_aemif_device = {
> #define DM646X_EVM_ATA_PWD BIT(1)
>
> /* CPLD Register 0 Client: used for I/O Control */
> -static int cpld_reg0_probe(struct i2c_client *client,
> - const struct i2c_device_id *id)
> +static int cpld_reg0_probe(struct i2c_client *client)
> {
> if (HAS_ATA) {
> u8 data;
> @@ -197,7 +196,7 @@ static const struct i2c_device_id cpld_reg_ids[] = {
> static struct i2c_driver dm6467evm_cpld_driver = {
> .driver.name = "cpld_reg0",
> .id_table = cpld_reg_ids,
> - .probe = cpld_reg0_probe,
> + .probe_new = cpld_reg0_probe,
> };
>
> /* LEDS */
> @@ -402,8 +401,7 @@ static struct snd_platform_data dm646x_evm_snd_data[] = {
> #ifdef CONFIG_I2C
> static struct i2c_client *cpld_client;
>
> -static int cpld_video_probe(struct i2c_client *client,
> - const struct i2c_device_id *id)
> +static int cpld_video_probe(struct i2c_client *client)
> {
> cpld_client = client;
> return 0;
> @@ -424,7 +422,7 @@ static struct i2c_driver cpld_video_driver = {
> .driver = {
> .name = "cpld_video",
> },
> - .probe = cpld_video_probe,
> + .probe_new = cpld_video_probe,
> .remove = cpld_video_remove,
> .id_table = cpld_video_id,
> };
>
> base-commit: bcf876870b95592b52519ed4aafcf9d95999bc9c
> --
> 2.20.1
>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ARM: davinci: use simple i2c probe function
2020-08-09 17:24 [PATCH v2] ARM: davinci: use simple i2c probe function Stephen Kitt
2020-08-10 9:37 ` Wolfram Sang
2020-08-10 18:47 ` Bartosz Golaszewski
@ 2020-08-13 13:08 ` Luca Ceresoli
2 siblings, 0 replies; 5+ messages in thread
From: Luca Ceresoli @ 2020-08-13 13:08 UTC (permalink / raw)
To: Stephen Kitt, Sekhar Nori, Bartosz Golaszewski, Russell King,
linux-arm-kernel
Cc: linux-i2c, linux-kernel
Hi,
On 09/08/20 19:24, Stephen Kitt wrote:
> The i2c probe functions here don't use the id information provided in
> their second argument, so the single-parameter i2c probe function
> ("probe_new") can be used instead.
>
> This avoids scanning the identifier tables during probes.
>
> Signed-off-by: Stephen Kitt <steve@sk2.org>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
--
Luca
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ARM: davinci: use simple i2c probe function
2020-08-10 9:37 ` Wolfram Sang
@ 2020-09-03 5:38 ` Sekhar Nori
0 siblings, 0 replies; 5+ messages in thread
From: Sekhar Nori @ 2020-09-03 5:38 UTC (permalink / raw)
To: Wolfram Sang, Stephen Kitt, Bartosz Golaszewski, Russell King,
linux-arm-kernel, linux-i2c, linux-kernel
On 10/08/20 3:07 PM, Wolfram Sang wrote:
> On Sun, Aug 09, 2020 at 07:24:44PM +0200, Stephen Kitt wrote:
>> The i2c probe functions here don't use the id information provided in
>> their second argument, so the single-parameter i2c probe function
>> ("probe_new") can be used instead.
>>
>> This avoids scanning the identifier tables during probes.
>>
>> Signed-off-by: Stephen Kitt <steve@sk2.org>
>
> This is useful, helps deprecating the old probe method:
>
> Acked-by: Wolfram Sang <wsa@kernel.org>
Queued for v5.10.
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-03 5:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-09 17:24 [PATCH v2] ARM: davinci: use simple i2c probe function Stephen Kitt
2020-08-10 9:37 ` Wolfram Sang
2020-09-03 5:38 ` Sekhar Nori
2020-08-10 18:47 ` Bartosz Golaszewski
2020-08-13 13:08 ` Luca Ceresoli
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).