Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3741114ybh; Tue, 6 Aug 2019 00:31:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUGwRkQNMAAy/dFdcbsmhAzR+6vk7OEq05ELxEd5/G1GimMuTQ8eXWWC1cGebdP9Pyk6MW X-Received: by 2002:a17:90a:9a95:: with SMTP id e21mr1733900pjp.98.1565076672451; Tue, 06 Aug 2019 00:31:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565076672; cv=none; d=google.com; s=arc-20160816; b=JhJ/eq8Uo/hWjbN0C4+BHip21Bu16Fn30fZuwAl++Ok8/iZFAaWnCLJHhVaUNXgwsp 3M+KVDTZVF5gk6Wsypton+pzzamtQWIBFKw+t7/z+Aa2mys/GiMk+ItR2SP/Eho9XAIt B5/z23xYP+4ejXwZ12UskWCqho9i8LdCSE10C754RzSyXmi/Czbded+ppHz5ChdVcZMA I4d7TTXl5O928CBN/uzROFPP6C9ZzWj36Hm7RbUlRb/5rBkQClykgkr/aCG5VpmnvBLq //NHl+rUDjdwoO49IVIx79tGvO+5EEQUKkm6o4oJEUDnYBOv1hfJVYk1JJCnKxUfNFB0 UIEw== 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 :in-reply-to:references:mime-version; bh=Rt7p4w8GRASsTh4L8meL9OiYP/BUIZ+eM+Oj2ozLZX0=; b=EA1+yo98aUMJdGUy1Lf9vqbRTQHrPKDvaz9SQVorf/fewygo6PNvHuV+3PfT3a1db6 +gQKjAg1HCZnxDLd1A0UpLbEgm8OtVoWRTgCdsE/zZSr35fTr1C6oW3DtkO6eHP/85O5 kJ5bp6Yq+qKoeyQ6Mkj2fosBwKg9HlPO6J6/jTK3e4+rnkId6kmcLiBWtvZ3tj+GVlO7 R1UHUY4f2FiF4VFWC7wjk5Tq5BzGELnAfH3wUlqucQbgfrkLQ1w35V3B3CY2R1iDnTOg wMIPWp9KV0xVnkSkCvDTRM/lW5zj1OGq4EyO/iOzm3jtTCempLmPOJLY28tb149QKCxX U64A== ARC-Authentication-Results: i=1; mx.google.com; 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 s13si8103807pgn.123.2019.08.06.00.30.56; Tue, 06 Aug 2019 00:31:12 -0700 (PDT) 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; 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 S1732050AbfHFHaW (ORCPT + 99 others); Tue, 6 Aug 2019 03:30:22 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:43136 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731735AbfHFHaW (ORCPT ); Tue, 6 Aug 2019 03:30:22 -0400 Received: by mail-oi1-f194.google.com with SMTP id w79so65222950oif.10; Tue, 06 Aug 2019 00:30:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Rt7p4w8GRASsTh4L8meL9OiYP/BUIZ+eM+Oj2ozLZX0=; b=jNHIHAgNhRMrrc89l8FgqZBib4R88DxCJIa/S/gK0xb0C+QyYDxrNxsJ/aTo9zTQkX FzQ9oXsxHVPjfNUQwrMDojCh7gIFqYh3V7XbmTExcVsERJHBGo2LeAscv6P1E8dgxaKo DaXV3ImToOknn2cVFB09gANmXfL5s2ng69BNG0K40yD0K+z3xB7LrSPJvhxTXmWCfsg0 dkmc23aa1tOaaDY8AV2jTxral0OW/oeXVlMIEPHQ3vnNZeXUVF5RN57vrB0LBJ6NXIaK dlUyIjHKnB1tMPlHPScrbFKqIWyRNFBc6k5WGrPaK19jTjYdXBP7ct+3YVMLCXgykZjf stKg== X-Gm-Message-State: APjAAAXujK44SfLOxpJ4GLMS0OKls9Y+Xy8uCe4Ev61MQipwBfd6ZlYE oCRIErLLB7IjbF/zbY9E43yvrJijXE+VN7himQg= X-Received: by 2002:aca:bd43:: with SMTP id n64mr1471003oif.148.1565076621538; Tue, 06 Aug 2019 00:30:21 -0700 (PDT) MIME-Version: 1.0 References: <20190710193918.31135-1-kieran.bingham+renesas@ideasonboard.com> <0e1b6e0b-1c94-4b00-7fda-c2a303ee3816@redhat.com> <20190731194419.GB4084@kunai> <2567a74d-738e-6fed-d91c-cc70743e116d@redhat.com> In-Reply-To: <2567a74d-738e-6fed-d91c-cc70743e116d@redhat.com> From: Geert Uytterhoeven Date: Tue, 6 Aug 2019 09:30:10 +0200 Message-ID: Subject: Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables To: Javier Martinez Canillas Cc: Masahiro Yamada , Wolfram Sang , Kieran Bingham , Michal Marek , Linux Kbuild mailing list , open list , Linux-Renesas , Lee Jones , Alexandre Belloni , Andy Shevchenko , Mark Brown 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 On Tue, Aug 6, 2019 at 12:48 AM Javier Martinez Canillas wrote: > On 8/1/19 4:17 AM, Masahiro Yamada wrote: > So I think that we should either: > > a) take Kieran's patch or b) remove the i2c_of_match_device_sysfs() fallback > for OF and require an I2C device table for sysfs instantiation and matching. > > > If a driver supports DT and devices are instantiated via DT, > > in which situation is this useful? > > Is useful if you don't have all the I2C devices described in the DT. For example > a daughterboard with an I2C device is connected to a board through an expansion > slot or an I2C device connected directly to I2C pins exposed in a machine. > > In these cases your I2C devices won't be static so users might want to use the > sysfs user-space interface to instantiate the I2C devices, i.e: > > # echo eeprom 0x50 > /sys/bus/i2c/devices/i2c-3/new_device > > as explained in https://github.com/torvalds/linux/blob/master/Documentation/i2c/instantiating-devices#L207 Does this actually work with DT names, too? E.g. # echo atmel,24c02 > /sys/bus/i2c/devices/i2c-3/new_device Still leaves us with legacy names for backwards compatibility. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds