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]

 



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() ?

...

> +		ads->dev_props[NEXT_PROPERTY(prop_index, DEV_ROTATION)] =
> +			PROPERTY_ENTRY_U32("rotation",
> +					   (u32)pld->rotation * 45U);

Why do you need casting?

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux