Received: by 10.223.176.5 with SMTP id f5csp924687wra; Fri, 9 Feb 2018 09:23:21 -0800 (PST) X-Google-Smtp-Source: AH8x227bSONDpOUYuCfUN1TrZvUyVJ6Fkao5smHTG3WGrWtP1dnRx1FcfUFc9ZE2Fzpp62XqfFdd X-Received: by 10.99.126.25 with SMTP id z25mr2872526pgc.279.1518197001324; Fri, 09 Feb 2018 09:23:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518197001; cv=none; d=google.com; s=arc-20160816; b=0TKluk7N+IGjLfjS7t7faT7IuYoDwo4KZMYdyQJ7BIqvaTsZ2khQJeK9cAVW5i0m7H S0DanARHMvX9u3l3Ty5k4wuyw7TZ3nKmXamMkMemMvEVWVY0Y6k5xnIjZ5GDNPcoWdYl Uv+im+Fsgi97vmWuUqKLXrqPyomx9Qcnc7SMvySzwnsj4BwBL6/IpUM+ZPRH1dlEUB3m yC0uC44x7Bcust7TTVC6KURkkOIWZPsPs88glKWcTd+lhF2H1B7VOdGynti/tbdyUmzT 1dBFU/rdAftwacqi12sF1/1aTdjOwNkETJsJrMnwxBh2Ex2/c1HUUoqe0VMJzTKtckZb Pfag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Cq4bN0l8Phk8g49sOCnGiYEzPqtOnTifUt4Q6bECoV4=; b=aIUSbLHMfzmjaHgS6gz+HqEHg8cCaQh0Bl3hoMM64FOkBRs1KVB7trWwzSM86bMNfM 89Zjal2W83N6E+CB/e/g+2J+xypHXpPx5KCTnpmgJWBrnNSlqcVOItCzAxZC9QQPK6kd 9RcfCsEiNlTjEtCX3mVXZ9RX1gJMc25X3RmRiULJiG0i58t0ZhP37wEFpjvTByrjOgGw Ht3B7M93oojC8knxpxMxsRuYWsJ6ETWTd4aJJKPSK6+mWUp7B1ZtfGgPhEI/fUS0yidX vKW89QFmnZqk7I4gqL638zYZyuW+dK0lkdXqbF2DBkyHEmdczEAd3R9Dfq/aIIuV4voZ dLgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dowhile0-org.20150623.gappssmtp.com header.s=20150623 header.b=Us21kc6M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j128si1971648pfc.209.2018.02.09.09.23.06; Fri, 09 Feb 2018 09:23:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@dowhile0-org.20150623.gappssmtp.com header.s=20150623 header.b=Us21kc6M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752203AbeBIRW0 (ORCPT + 99 others); Fri, 9 Feb 2018 12:22:26 -0500 Received: from mail-it0-f42.google.com ([209.85.214.42]:52000 "EHLO mail-it0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751070AbeBIRWU (ORCPT ); Fri, 9 Feb 2018 12:22:20 -0500 Received: by mail-it0-f42.google.com with SMTP id p139so11831657itb.1 for ; Fri, 09 Feb 2018 09:22:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dowhile0-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Cq4bN0l8Phk8g49sOCnGiYEzPqtOnTifUt4Q6bECoV4=; b=Us21kc6M/Ko3+OIwoGgaL7vup7szJsFlJ1t2vvzqn4XG11F1x2XPmjblBjzpBbrdtB 2PFcB7iCfE6FBbvE8C63ISl8f1qKVdr77z4UYbVIcyz+3sTRrfq4Rrg2T68Y60f1mrRc H/yYyGLpRUq1t6tnyCR80xxKLI+0+45OPFCnSZTJeej0NZxb3WKq6/he15oPqmEOEhfa eq/ezNrG/xe6+3Vsa7NKLOKvY/rbILF73ruGPba2DYTayHQ1R3oirad9U0LnMBIMC7Z+ BqFd0uR28cFwCVavkqfL2UK6nvHWRCY+GqQDZN+fQxk67j7fECytRqaP3mPjbcEQQcL7 09uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Cq4bN0l8Phk8g49sOCnGiYEzPqtOnTifUt4Q6bECoV4=; b=XH0BwF5X8nN970z/Rc2VfPwwR4DSuFNJCyGAEHMvyja5wjtHioj154ZT2Sc/zvhq6y D8BhEJRZ/f7jp9+TKZWn2Vv4ShYz9lCrbIgIJGtpa48mx3jwYYjHYSfkyEO3PMU6vUwN slBdml0k6oK6aS30pFaNT0/YH7pVe9I3UWItfT9DWX40HAqZEiAgroVZxW0/LOG4dvOa Eqx9TyJbmAshnsDZTRGf2wmBvqGABodPLoB2Tn8jD68tq0Bouws8AyOcdSJhB+ZEzHWR vVyoWlfnB/Mdcw/plkhsrS2aZ8xq6dFoShP8PMofPSQX9b1YYyk3K1lykzO2Sb6hVWSK f1AQ== X-Gm-Message-State: APf1xPBFAfoO4mVuRsTvYC7jGPW0YogKRkSFBIwgUay9yHafVZC0ZPUi jSOCnk8RpFbjyFu3O4RW/ebykenghqf3Ugm/qHXpEw== X-Received: by 10.36.89.68 with SMTP id p65mr4074629itb.98.1518196939910; Fri, 09 Feb 2018 09:22:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.144.69 with HTTP; Fri, 9 Feb 2018 09:22:19 -0800 (PST) X-Originating-IP: [90.77.100.34] In-Reply-To: References: From: Javier Martinez Canillas Date: Fri, 9 Feb 2018 18:22:19 +0100 Message-ID: Subject: Re: i2c: core: report OF style module alias for devices registered via OF To: Wolfram Sang Cc: Dmitry Mastykin , Linux Kernel Mailing List , Linux I2C , Javier Martinez Canillas Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wolfram, On Tue, Jan 16, 2018 at 3:11 PM, Javier Martinez Canillas wrote: > Hello Dmitry, > > On 01/16/2018 02:55 PM, Dmitry Mastykin wrote: >> On Sun, 3 Dec 2017 22:40:50 +0100, Javier Martinez Canillas >> wrote: >> >>> The buses should honor the firmware interface used to register the device, >>> but the I2C core reports a MODALIAS of the form i2c: even for I2C >>> devices registered via OF. >>> >>> This means that user-space will never get an OF stype uevent MODALIAS even >>> when the drivers modules contain aliases exported from both the I2C and OF >>> device ID tables. For example, an Atmel maXTouch Touchscreen registered by >>> a DT node with compatible "atmel,maxtouch" has the following module alias: >>> >>> $ cat /sys/class/i2c-adapter/i2c-8/8-004b/modalias >>> i2c:maxtouch >>> >>> So udev won't be able to auto-load a module for an OF-only device driver. >>> Many OF-only drivers duplicate the OF device ID table entries in an I2C ID >>> table only has a workaround for how the I2C core reports the module alias. >>> >>> This patch changes the I2C core to report an OF related MODALIAS uevent if >>> the device was registered via OF. So for the previous example, after this >>> patch, the reported MODALIAS for the Atmel maXTouch will be the following: >>> >>> $ cat /sys/class/i2c-adapter/i2c-8/8-004b/modalias >>> of:NtrackpadTCatmel,maxtouch >>> >>> NOTE: This patch may break out-of-tree drivers that were relying on this >>> behavior, and only had an I2C device ID table even when the device >>> was registered via OF. There are no remaining drivers in mainline >>> that do this, but out-of-tree drivers have to be fixed and define >>> a proper OF device ID table to have module auto-loading working. >>> >> >> Hello Javier, >> thank you for your patch! >> > > Thanks a lot for testing! > > Hopefully Wolfram will review/merge this soon, otherwise in the meantime drivers > are going to add I2C device ID tables just as a workaround or new drivers won't > include a OF device ID tables since these aren't really required today. > Another gentle ping for this. Best regards, Javier