i2c driver develpment with diolan DLN-2 / ACPI?

Martin Kepplinger martink at posteo.de
Sat Apr 30 13:14:19 EDT 2016


Am 2016-04-30 um 18:48 schrieb Daniel Baluta:
> On Sat, Apr 30, 2016 at 6:10 PM, Martin Kepplinger <martink at posteo.de> wrote:
>> Am 2016-04-27 um 13:51 schrieb Daniel Baluta:
>>> On Wed, Apr 27, 2016 at 2:36 PM, Martin Kepplinger <martink at posteo.de> wrote:
>>>> Hi roberta or anyone who uses a diolan i2c/spi bridge device,
>>>>
>>>> I try to do get the kernel driver for the connected chip loaded, but I'm
>>>> having some trouble getting it right.
>>>>
>>>> Cables are connected to the device (i2c), and the (mainline) kernel
>>>> driver for the diolan DLN-2 device is compiled and loaded on plugin.
>>>>
>>>> I don't use any of their (userspace) software.
>>>>
>>>> Now I get a new i2c bus and can manually instanciate my driver
>>>>
>>>> root at laptop:/sys/bus/i2c/devices/i2c-7# echo mma8452 0x1c > new_device
>>>>
>>>> and the driver loads. (Now for development, later maybe for merging) I
>>>> added acpi support, I guess I'd need it, but ACPI_HANDLE(&client->dev)
>>>> isn't true (during probe) hence we don't continue. I append my
>>>> adding-acpi-patch below.
>>>>
>>>> How do you do it?
>>>>
>>>> Do *you* manually instantiate your i2c-driver during development with
>>>> your diolan device or should it somehow even get loaded automatically?
>>>>
>>>
>>> Hi Martin,
>>>
>>> Please also use the following two patches:
>>>
>>> https://lkml.org/lkml/2014/12/16/290
>>> https://lkml.org/lkml/2014/12/16/289
>>>
>>> How does your setup looks like?
>>>
>>
>> Those patches don't apply anymore, also because of API changes. I save
>> them but I'll ignore the ACPI problem for now. Oh well, for development
>> only, I skip it and go ahead and try to write and read registers.
>>
>> Different problem:
>>
>> i2c_smbus_read_byte_data always returns with "Protocol Error".
>>
>> DLN-2 jumpers are correct. Is there anything special to consider, using
>> the DLN-2, regardless of which chip you are talking to?
>>
> 
> Please check the wiring. Also make sure you run at the correct
> voltage for your specific chip.

Although I accidently used 5V before, I use 3,3V now, which should be
ok. I doubt 5V killed it, and "Protocol Error" suggests it is alive.

> 
> One other thing, is the firmware version.
> 
> http://dlnware.com/Downloads
> 
> AFAIK Diolan by default comes in U2C compatiblity mode
> which will not work with DLN2 drivers.

They sell the device with their different firmware seperately:
https://diolan.com/dln2 what I have, and
https://diolan.com/dln2u2c  in U2C compatibility.

> 
> Daniel.
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> 




More information about the Kernelnewbies mailing list