On Tue, Dec 10, 2013 at 10:18:12AM +0000, Bruno Randolf wrote:
> On 12/05/2013 04:56 PM, Simon Guinot wrote:
> > Note that this base address is shared between several drivers: 
> > watchdog/sch311x_wdt, hwmon/dme1737 and gpio/gpio-sch311x.c. The
> > same logical device (0xa) is used.
> > 
> > Moreover some offsets against this base address are also shared.
> > For example, 0x47 is a "valid" offset for both the GPIO and the
> > watchdog drivers. I guess that the correct usage for this pin
> > depends on how the hardware is wired. Unfortunately, there is no
> > way for the drivers to guess that.
> > 
> > Did you had the opportunity to run all this drivers together ?
> 
> My access to the board is limited, but I had a chance to try it.
> 
> dme1737 doesn't load because there is another resource conflict:
> 
> # modprobe dme1737
> FATAL: Error inserting dme1737
> (/lib/modules/3.13.0-rc1-wl+/kernel/drivers/hwmon/dme1737.ko): Device
> or resource busy
> 
> [  181.109897] ACPI Warning: 0x00000670-0x00000671 SystemIO conflicts
> with Region \_SB_.PCI0.LPCB.RNTR 1 (20130927/utaddress-251)
> [  181.109921] ACPI: If an ACPI driver is available for this device,
> you should use it instead of the native driver

You can enforce the driver loading with the kernel parameter
acpi_enforce_resources={lax|no}.

> 
> I can load and use sch311x_wdt and gpio-sch311x at the same time,
> because they reserve different memory regions:
> 
> /proc/ioports:
>   0647-0647 : sch311x_wdt
>   064b-0650 : gpio-sch311x
>   0665-0668 : sch311x_wdt
> 
> Only when I'd try to request GPIO 60 (offset 0x47) I obviously get a
> conflict:
> 
> # echo 60 > /sys/class/gpio/export
> -bash: echo: write error: Device or resource busy
> 
> [  334.776859] gpio-sch311x gpio-sch311x: Failed to request region 0x0647.
> 
> I think this can be expected...

Yes indeed. I guess this kind of devices with common resources could
really make use of a mfd driver.

Regards,

Simon

Attachment: signature.asc
Description: Digital signature

Reply via email to