Re: [PATCH 5/8] ACPI: property: Dig "rotation" property for devices with CSI2 _CRS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy,

On Tue, Jan 17, 2023 at 05:22:11PM +0200, Andy Shevchenko wrote:
> On Tue, Jan 17, 2023 at 02:22:41PM +0200, Sakari Ailus wrote:
> > Dig "rotation" property value for devices with _CRS CSI2 resource
> > descriptor. The value comes from _PLD (physical location of device)
> > object, if it exists for the device.
> > 
> > This way camera sensor drivers that know the "rotation" property do not
> > need to care about _PLD on ACPI.
> 
> ...
> 
> > +	if (fwnode_property_read_u32(fwnode, "rotation", &val) &&
> > +	    acpi_get_physical_device_location(acpi_device_handle(device),
> > +					      &pld) == AE_OK) {
> 
> ACPI_SUCCESS() ?

Yes.

> 
> ...
> 
> > +		ads->dev_props[NEXT_PROPERTY(prop_index, DEV_ROTATION)] =
> > +			PROPERTY_ENTRY_U32("rotation",
> > +					   (u32)pld->rotation * 45U);
> 
> Why do you need casting?

I think it's actually not needed.

-- 
Sakari Ailus



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux