Re: [net-next,v3 2/2] net: phy: sfp: enable i2c-bus detection on ACPI based systems

2019-05-28 Thread Russell King - ARM Linux admin
On Mon, May 27, 2019 at 08:22:13PM -0700, Ruslan Babayev wrote: > Lookup I2C adapter using the "i2c-bus" device property on ACPI based > systems similar to how it's done with DT. > > An example DSD describing an SFP on an ACPI based system: > > Device (SFP0) > { > Name (_HID, "PRP0001") >

Re: [net-next,v3 2/2] net: phy: sfp: enable i2c-bus detection on ACPI based systems

2019-05-28 Thread Mika Westerberg
On Mon, May 27, 2019 at 08:22:13PM -0700, Ruslan Babayev wrote: > + } else if (ACPI_COMPANION(&pdev->dev)) { You can also use has_acpi_companion() here. > + struct acpi_device *adev = ACPI_COMPANION(&pdev->dev); > + struct fwnode_handle *fw = acpi_fwnode_handle(adev);

[net-next,v3 2/2] net: phy: sfp: enable i2c-bus detection on ACPI based systems

2019-05-27 Thread Ruslan Babayev
Lookup I2C adapter using the "i2c-bus" device property on ACPI based systems similar to how it's done with DT. An example DSD describing an SFP on an ACPI based system: Device (SFP0) { Name (_HID, "PRP0001") Name (_CRS, ResourceTemplate() { GpioIo(Exclusive, PullDefault, 0, 0,