Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753697Ab1CKWpY (ORCPT ); Fri, 11 Mar 2011 17:45:24 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:43646 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753294Ab1CKWpW convert rfc822-to-8bit (ORCPT ); Fri, 11 Mar 2011 17:45:22 -0500 MIME-Version: 1.0 In-Reply-To: <4D79F068.2080009@linaro.org> References: <4D79F068.2080009@linaro.org> From: Grant Likely Date: Fri, 11 Mar 2011 15:45:01 -0700 X-Google-Sender-Auth: VY1PcF8orOXYSVBx5vyvEeKPg3c Message-ID: Subject: Re: RFC: Platform data for onboard USB assets To: andy.green@linaro.org Cc: Andy Green , Linux USB list , lkml , Benjamin Herrenschmidt , Arnd Bergmann , Greg Kroah-Hartman Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 973 Lines: 24 On Fri, Mar 11, 2011 at 2:50 AM, Andy Green wrote: > Hi - > > platform_data is a well established way in Linux to pass configuration data > up to on-board assets from a machine file like mach-xyz.c. ?It's also > supported to pass platform_data up to devices that are probed asynchronously > from busses like i2c as well, which is very handy. > > However AFAIK it's not possible to bind platform_data to probed USB devices > as it stands. Oh, please no. platform_data is an ugly non-type-checked anonymous pointer. If you need to pass data to a driver, use something better designed. A device tree fragment would work, or provide some kind of query api. platform_data is definitely the wrong approach. g. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/