From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754536AbcGFOle (ORCPT ); Wed, 6 Jul 2016 10:41:34 -0400 Received: from www381.your-server.de ([78.46.137.84]:50345 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753825AbcGFOlc (ORCPT ); Wed, 6 Jul 2016 10:41:32 -0400 Subject: Re: [PATCH 0/2] i2c-dev: Don't let userspace block adapter To: Viresh Kumar , Wolfram Sang , Jean Delvare References: Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, Johan Hovold , Alex Elder From: Lars-Peter Clausen Message-ID: <577D1895.3060202@metafoo.de> Date: Wed, 6 Jul 2016 16:41:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Authenticated-Sender: lars@metafoo.de Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/06/2016 04:57 AM, Viresh Kumar wrote: > Hi Wolfram/Jean, > > I am part of the kernel team for Google's projectara [1], where we are > building a module smart phone. > > This series tries to fix one of the problems we hit on our system as we > are required to hotplug pretty much every thing on the phone and so this > fixes hotplug issues with i2c-dev. > > As described in the second patch, the current implementation of i2c-dev > file operations doesn't let the modules (hardware attached to the phone) > eject from the phone as the cleanup path for the module hasn't finished > yet (i2c adapter not removed). > > We can't let the userspace block the kernel devices forever in such > cases. > > I was able to test them on the ARA phone with kernel 3.10 only and not > mainline. This sounds like you want hot-unplug. This is currently not support by the I2C framework for adapters. A better approach compared to this series might be to implement full hot-unplug support for I2C adapters. This will probably also be useful for additional usecases.