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