[MinnowBoard] drivers/platform/x86/minnowboard.c for MinnowboardMax?

Darren Hart dvhart at linux.intel.com
Mon Feb 9 15:56:27 UTC 2015


The generic driver structure works the same for x86. Ideally you would be
able to trigger the probe via an SSDT overlay (small bit of AML that
functions similar to a fdt blob). The driver itself would only need a
couple updates to support the new device-properties API which abstracts
away the ACPI and DT part from properties collection. But, that doesn't
help you too much right now.

One approach would be to dynamically create the device at runtime, with
something like:

# echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-0/new_device

(I'm not in front of a Mmax at the moment, so verify the paths and values)

Check that it worked with:
# dmesg | grep bmp

You should see something like:
i2c i2c-1: new_device: Instantiated device bmp085 at 0x77
bmp085 1-0077: Successfully initialized bmp085!


Alternatively, you could write a simple board file driver which populates
the bmp085 platform data and registers the device. I didn't find any
bmp085 specific examples, but you should be able to follow another i2c
example board file and extrapolate from there.

Thanks,

-- 
Darren Hart
Intel Open Source Technology Center




From:  Yong Li <sdliyong at gmail.com>
Reply-To:  MinnowBoard Development and Community Discussion
<elinux-minnowboard at lists.elinux.org>
Date:  Monday, February 9, 2015 at 6:10 AM
To:  <henry.bruce at intel.com>
Cc:  <elinux-minnowboard at lists.elinux.org>
Subject:  [MinnowBoard] drivers/platform/x86/minnowboard.c for
MinnowboardMax?


>Hi Henry,
>
>Thanks for your reply. I am testing a pressure sensor using the MAX
>board. It is an IIC device, and the kernel does support it with
>drivers/misc/bmp085.c. I really want to use the kernel device driver to
>support this device(Using /sys file to query the pressure)
>
>The problem is I do not know how to trigger the driver_probe function.
>
>On ARM platform, there are board/machine .c files, I can add i2c board
>info in these files. However I do not know to use the
>i2c_register_board_info on X86, is there any examples?.
>
>Message: 4
>Date: Mon, 9 Feb 2015 07:42:06 +0000
>From: "Bruce, Henry" <henry.bruce at intel.com>
>To: MinnowBoard Development and Community Discussion
>        <elinux-minnowboard at lists.elinux.org>
>Subject: Re: [MinnowBoard] drivers/platform/x86/minnowboard.c for
>        Minnowboard     Max?
>Message-ID:
>        
><F81DC1078564A34BB4DA30CAE03814D127685017 at ORSMSX104.amr.corp.intel.com>
>
>Content-Type: text/plain; charset="utf-8"
>
>Yong Li,
>
>Take a look at the mraa<https://github.com/intel-iot-devkit/mraa> library
>that supports gpio and i2c for Minnowboard Max. For software that uses
>this library see the upm sensor
>library.<https://github.com/intel-iot-devkit/upm> There is no support
>planned for Minnowboard v1.
>
>Regards,
>
>Henry Bruce
>
>
>
>From: elinux-MinnowBoard
>[mailto:elinux-minnowboard-bounces at lists.elinux.org] On Behalf Of Yong Li
>Sent: Sunday, February 8, 2015 4:57 AM
>To: elinux-minnowboard at lists.elinux.org
>Subject: [MinnowBoard] drivers/platform/x86/minnowboard.c for Minnowboard
>Max?
>
>Hi All, I am using the kernel 3.14.19 for my Max, but I did not find the
>drivers/platform/x86/minnowboard.c file and other related patches for
>Minnowboard, I would like to port them to support the Max board, to add
>some other IO devices, such as IIC, SPI and other GPIO devices.
>
>In which version, can I find these files? Is there any other demo drivers
>for the IIC/SPI on Minnboard and/or Max board?
>
>Thanks,
>Yong Li
>
>_______________________________________________
>elinux-MinnowBoard mailing list
>elinux-MinnowBoard at lists.elinux.orghttp://lists.elinux.org/mailman/listinf
>o/elinux-minnowboard




More information about the elinux-MinnowBoard mailing list