From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261214AbVGYQDo (ORCPT ); Mon, 25 Jul 2005 12:03:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261239AbVGYQDo (ORCPT ); Mon, 25 Jul 2005 12:03:44 -0400 Received: from rproxy.gmail.com ([64.233.170.204]:62552 "EHLO rproxy.gmail.com") by vger.kernel.org with ESMTP id S261214AbVGYQDn convert rfc822-to-8bit (ORCPT ); Mon, 25 Jul 2005 12:03:43 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SEstiZciCSZEYfHrxY44jtSOjBCHA0XfQVYXk4n1m1m/eu0S7Eycv273Q3dRH6sjZqREC670dyF+WtYFCbJ1mMKvyWOnUfN+vJuA0zHovmYM1sqiLxBY4skIPZdDGPcKWC4PBe7fKSRELjzw09vozHLDYCfC9Dkaes7UcNFnPQ8= Message-ID: Date: Mon, 25 Jul 2005 11:02:43 -0500 From: Dmitry Torokhov Reply-To: dtor_core@ameritech.net To: dtor_core@ameritech.net, Pavel Machek , rpurdie@rpsys.net, lenz@cs.wisc.edu, kernel list , vojtech@suse.cz Subject: Re: [patch 1/2] Touchscreen support for sharp sl-5500 In-Reply-To: <20050725165014.B7629@flint.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Content-Disposition: inline References: <20050722180109.GA1879@elf.ucw.cz> <20050724174756.A20019@flint.arm.linux.org.uk> <20050725045607.GA1851@elf.ucw.cz> <20050725165014.B7629@flint.arm.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On 7/25/05, Russell King wrote: > On Mon, Jul 25, 2005 at 10:16:05AM -0500, Dmitry Torokhov wrote: > > If the problem is that you have a single piece of hardware you need to > > bind several drivers to - I guess you will have to create a new > > sub-device bus for that. Or just register sub-devices on the same bus > > the parent device is registered on - I am not sure what is best in > > this particular case - I am not familiar with the arch. > > That is exactly the problem - these kinds of devices do _not_ fit > well into the device model. A struct device for every different > possible sub-unit is completely overkill. > > For instance, you may logically use one ADC and some GPIO lines > on the device for X and something else for Y and they logically > end up in different drivers. > > The problem is that the parent doesn't actually know how many > devices to create nor what to call them, and they're logically > indistinguishable from each other so there's no logical naming > system. > Then we should probably not try to force them into driver model. Have parent device register struct device and when sub-drivers register they could attach class devices (like input devices) directly to the "main" device thus hiding presence of sub-sections of the chip from sysfs completely. My point is that we should not be using class_interface here - its purpose is diferent. -- Dmitry