2020-03-26 21:11:24

by Wolfram Sang

[permalink] [raw]
Subject: [PATCH 6/6] drm/radeon: convert to use i2c_new_client_device()

Move away from the deprecated API.

Signed-off-by: Wolfram Sang <[email protected]>
---
drivers/gpu/drm/radeon/radeon_atombios.c | 4 ++--
drivers/gpu/drm/radeon/radeon_combios.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 848ef68d9086..5d2591725189 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -2111,7 +2111,7 @@ static int radeon_atombios_parse_power_table_1_3(struct radeon_device *rdev)
ucOverdriveThermalController];
info.addr = power_info->info.ucOverdriveControllerAddress >> 1;
strlcpy(info.type, name, sizeof(info.type));
- i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
+ i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
}
}
num_modes = power_info->info.ucNumOfPowerModeEntries;
@@ -2351,7 +2351,7 @@ static void radeon_atombios_add_pplib_thermal_controller(struct radeon_device *r
const char *name = pp_lib_thermal_controller_names[controller->ucType];
info.addr = controller->ucI2cAddress >> 1;
strlcpy(info.type, name, sizeof(info.type));
- i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
+ i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
}
} else {
DRM_INFO("Unknown thermal controller type %d at 0x%02x %s fan control\n",
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index c3e49c973812..d3c04df7e75d 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -2704,7 +2704,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
const char *name = thermal_controller_names[thermal_controller];
info.addr = i2c_addr >> 1;
strlcpy(info.type, name, sizeof(info.type));
- i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
+ i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
}
}
} else {
@@ -2721,7 +2721,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
const char *name = "f75375";
info.addr = 0x28;
strlcpy(info.type, name, sizeof(info.type));
- i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
+ i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
DRM_INFO("Possible %s thermal controller at 0x%02x\n",
name, info.addr);
}
--
2.20.1


2020-03-27 14:26:34

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 6/6] drm/radeon: convert to use i2c_new_client_device()

On Thu, Mar 26, 2020 at 5:35 PM Wolfram Sang
<[email protected]> wrote:
>
> Move away from the deprecated API.
>
> Signed-off-by: Wolfram Sang <[email protected]>

patches 1,6, are:
Acked-by: Alex Deucher <[email protected]>

> ---
> drivers/gpu/drm/radeon/radeon_atombios.c | 4 ++--
> drivers/gpu/drm/radeon/radeon_combios.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
> index 848ef68d9086..5d2591725189 100644
> --- a/drivers/gpu/drm/radeon/radeon_atombios.c
> +++ b/drivers/gpu/drm/radeon/radeon_atombios.c
> @@ -2111,7 +2111,7 @@ static int radeon_atombios_parse_power_table_1_3(struct radeon_device *rdev)
> ucOverdriveThermalController];
> info.addr = power_info->info.ucOverdriveControllerAddress >> 1;
> strlcpy(info.type, name, sizeof(info.type));
> - i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
> + i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
> }
> }
> num_modes = power_info->info.ucNumOfPowerModeEntries;
> @@ -2351,7 +2351,7 @@ static void radeon_atombios_add_pplib_thermal_controller(struct radeon_device *r
> const char *name = pp_lib_thermal_controller_names[controller->ucType];
> info.addr = controller->ucI2cAddress >> 1;
> strlcpy(info.type, name, sizeof(info.type));
> - i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
> + i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
> }
> } else {
> DRM_INFO("Unknown thermal controller type %d at 0x%02x %s fan control\n",
> diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
> index c3e49c973812..d3c04df7e75d 100644
> --- a/drivers/gpu/drm/radeon/radeon_combios.c
> +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> @@ -2704,7 +2704,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
> const char *name = thermal_controller_names[thermal_controller];
> info.addr = i2c_addr >> 1;
> strlcpy(info.type, name, sizeof(info.type));
> - i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
> + i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
> }
> }
> } else {
> @@ -2721,7 +2721,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
> const char *name = "f75375";
> info.addr = 0x28;
> strlcpy(info.type, name, sizeof(info.type));
> - i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
> + i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
> DRM_INFO("Possible %s thermal controller at 0x%02x\n",
> name, info.addr);
> }
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-03-27 15:26:20

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 6/6] drm/radeon: convert to use i2c_new_client_device()

On Fri, Mar 27, 2020 at 10:25:16AM -0400, Alex Deucher wrote:
> On Thu, Mar 26, 2020 at 5:35 PM Wolfram Sang
> <[email protected]> wrote:
> >
> > Move away from the deprecated API.
> >
> > Signed-off-by: Wolfram Sang <[email protected]>
>
> patches 1,6, are:
> Acked-by: Alex Deucher <[email protected]>
Should we commit all to drm-misc-next?

Sam


>
> > ---
> > drivers/gpu/drm/radeon/radeon_atombios.c | 4 ++--
> > drivers/gpu/drm/radeon/radeon_combios.c | 4 ++--
> > 2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
> > index 848ef68d9086..5d2591725189 100644
> > --- a/drivers/gpu/drm/radeon/radeon_atombios.c
> > +++ b/drivers/gpu/drm/radeon/radeon_atombios.c
> > @@ -2111,7 +2111,7 @@ static int radeon_atombios_parse_power_table_1_3(struct radeon_device *rdev)
> > ucOverdriveThermalController];
> > info.addr = power_info->info.ucOverdriveControllerAddress >> 1;
> > strlcpy(info.type, name, sizeof(info.type));
> > - i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
> > + i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
> > }
> > }
> > num_modes = power_info->info.ucNumOfPowerModeEntries;
> > @@ -2351,7 +2351,7 @@ static void radeon_atombios_add_pplib_thermal_controller(struct radeon_device *r
> > const char *name = pp_lib_thermal_controller_names[controller->ucType];
> > info.addr = controller->ucI2cAddress >> 1;
> > strlcpy(info.type, name, sizeof(info.type));
> > - i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
> > + i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
> > }
> > } else {
> > DRM_INFO("Unknown thermal controller type %d at 0x%02x %s fan control\n",
> > diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
> > index c3e49c973812..d3c04df7e75d 100644
> > --- a/drivers/gpu/drm/radeon/radeon_combios.c
> > +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> > @@ -2704,7 +2704,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
> > const char *name = thermal_controller_names[thermal_controller];
> > info.addr = i2c_addr >> 1;
> > strlcpy(info.type, name, sizeof(info.type));
> > - i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
> > + i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
> > }
> > }
> > } else {
> > @@ -2721,7 +2721,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
> > const char *name = "f75375";
> > info.addr = 0x28;
> > strlcpy(info.type, name, sizeof(info.type));
> > - i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
> > + i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
> > DRM_INFO("Possible %s thermal controller at 0x%02x\n",
> > name, info.addr);
> > }
> > --
> > 2.20.1
> >
> > _______________________________________________
> > dri-devel mailing list
> > [email protected]
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-03-27 15:28:31

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 6/6] drm/radeon: convert to use i2c_new_client_device()

On Fri, Mar 27, 2020 at 11:25 AM Sam Ravnborg <[email protected]> wrote:
>
> On Fri, Mar 27, 2020 at 10:25:16AM -0400, Alex Deucher wrote:
> > On Thu, Mar 26, 2020 at 5:35 PM Wolfram Sang
> > <[email protected]> wrote:
> > >
> > > Move away from the deprecated API.
> > >
> > > Signed-off-by: Wolfram Sang <[email protected]>
> >
> > patches 1,6, are:
> > Acked-by: Alex Deucher <[email protected]>
> Should we commit all to drm-misc-next?

I'm fine to see it go through whatever tree makes sense.

Alex


>
> Sam
>
>
> >
> > > ---
> > > drivers/gpu/drm/radeon/radeon_atombios.c | 4 ++--
> > > drivers/gpu/drm/radeon/radeon_combios.c | 4 ++--
> > > 2 files changed, 4 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
> > > index 848ef68d9086..5d2591725189 100644
> > > --- a/drivers/gpu/drm/radeon/radeon_atombios.c
> > > +++ b/drivers/gpu/drm/radeon/radeon_atombios.c
> > > @@ -2111,7 +2111,7 @@ static int radeon_atombios_parse_power_table_1_3(struct radeon_device *rdev)
> > > ucOverdriveThermalController];
> > > info.addr = power_info->info.ucOverdriveControllerAddress >> 1;
> > > strlcpy(info.type, name, sizeof(info.type));
> > > - i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
> > > + i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
> > > }
> > > }
> > > num_modes = power_info->info.ucNumOfPowerModeEntries;
> > > @@ -2351,7 +2351,7 @@ static void radeon_atombios_add_pplib_thermal_controller(struct radeon_device *r
> > > const char *name = pp_lib_thermal_controller_names[controller->ucType];
> > > info.addr = controller->ucI2cAddress >> 1;
> > > strlcpy(info.type, name, sizeof(info.type));
> > > - i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
> > > + i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
> > > }
> > > } else {
> > > DRM_INFO("Unknown thermal controller type %d at 0x%02x %s fan control\n",
> > > diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
> > > index c3e49c973812..d3c04df7e75d 100644
> > > --- a/drivers/gpu/drm/radeon/radeon_combios.c
> > > +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> > > @@ -2704,7 +2704,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
> > > const char *name = thermal_controller_names[thermal_controller];
> > > info.addr = i2c_addr >> 1;
> > > strlcpy(info.type, name, sizeof(info.type));
> > > - i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
> > > + i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
> > > }
> > > }
> > > } else {
> > > @@ -2721,7 +2721,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
> > > const char *name = "f75375";
> > > info.addr = 0x28;
> > > strlcpy(info.type, name, sizeof(info.type));
> > > - i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
> > > + i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
> > > DRM_INFO("Possible %s thermal controller at 0x%02x\n",
> > > name, info.addr);
> > > }
> > > --
> > > 2.20.1
> > >
> > > _______________________________________________
> > > dri-devel mailing list
> > > [email protected]
> > > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> > _______________________________________________
> > dri-devel mailing list
> > [email protected]
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-03-27 15:45:55

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH 6/6] drm/radeon: convert to use i2c_new_client_device()


> > > > Move away from the deprecated API.
> > > >
> > > > Signed-off-by: Wolfram Sang <[email protected]>
> > >
> > > patches 1,6, are:
> > > Acked-by: Alex Deucher <[email protected]>
> > Should we commit all to drm-misc-next?
>
> I'm fine to see it go through whatever tree makes sense.

I'd suggest drm-misc-next to minimize merge conflicts. But I can take it
via I2C tree, too, if desired.


Attachments:
(No filename) (435.00 B)
signature.asc (849.00 B)
Download all attachments

2020-03-27 17:04:46

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 6/6] drm/radeon: convert to use i2c_new_client_device()

On Fri, Mar 27, 2020 at 04:45:09PM +0100, Wolfram Sang wrote:
>
> > > > > Move away from the deprecated API.
> > > > >
> > > > > Signed-off-by: Wolfram Sang <[email protected]>
> > > >
> > > > patches 1,6, are:
> > > > Acked-by: Alex Deucher <[email protected]>
> > > Should we commit all to drm-misc-next?
> >
> > I'm fine to see it go through whatever tree makes sense.
>
> I'd suggest drm-misc-next to minimize merge conflicts. But I can take it
> via I2C tree, too, if desired.

If no-one else speaks up until tomorrow I will land them in
drm-misc-next.
Just wanted to make sure it was OK.

Sam