lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <884a0040-7965-5384-5fe1-8204ba73ccb1@lechnology.com>
Date:   Fri, 16 Sep 2016 16:09:02 -0500
From:   David Lechner <david@...hnology.com>
To:     Wolfram Sang <wsa@...-dreams.de>
Cc:     linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] i2c: expose adapter probe and remove probed functions

On 09/16/2016 04:03 PM, Wolfram Sang wrote:
>
>> The intended use of these functions is for LEGO MINDSTORMS sensors. These
>> are hot-plugable I2C devices. When a sensor is connected, i2c_adapter_probe()
>> is called to automatically configure the sensor. When the sensor is
>> disconnected, i2c_adapter_remove_probed() is called to remove the
>> automatically configured device.
>
> How do you detect the hot-plug events?
>

There are "port" drivers that do this. An I2C adapter is assigned to 
each port via device-tree or platform data struct.

Port driver code if you are interested:
- 
https://github.com/ev3dev/lego-linux-drivers/blob/master/ev3/legoev3_ports_in.c
- 
https://github.com/ev3dev/lego-linux-drivers/blob/master/evb/evb_ports_in.c

In particular, here is where we call the new i2c_adapter_probe() 
function: 
https://github.com/ev3dev/lego-linux-drivers/blob/master/evb/evb_ports_in.c#L543



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ