Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp822846imm; Tue, 3 Jul 2018 00:08:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKPm729aUMQ95BjSoM4RZly7Tczh5QI1tqwPM5feuu5EZpr5AvHELUGClgG2huCZ1UhIvi0 X-Received: by 2002:a17:902:68:: with SMTP id 95-v6mr28864019pla.178.1530601717051; Tue, 03 Jul 2018 00:08:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530601717; cv=none; d=google.com; s=arc-20160816; b=t38jna8KWeUKAGmNGv0S44mxpWPe+RaH3Fch6FDauom+jJU1cJ4mK4UWvvXJCVmJv3 0Vr1coSZucKnXEa9tJYDhvjrchs6g4R1UugxkFjPZSbGPevcb4dD9Ibo3Kboy3UMqawI uo8nryAUyp2hGY3LiQ3pOZpukDtNjEkd2vfo6f8ZYxQTG+rBP2LJw/kT3QEQLu1nAM8n 2oIoMdYu+I9yc5yuBYLY96Enp5hKck0thCEFVx0QMfvinQETIb8perwylv+Wf/GEQJ5J iP0vUCR3yDFbJSVEJzUY15Wa0jp+n6QPWqXSq+Rdnm1dSo2upPvgZx3BucWcR6puWuNS Welw== 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:date:from:message-id :arc-authentication-results; bh=THWbYFNf2NEIPUpeq3ggLa0UIDGUFWEtZS/i5HLql/k=; b=B/pvDuHc+TBwsWAv3nPdDZwupOwM6Q5BJ9U95Z52f6d5UK+PNY5Qbi0NubI5iMi5qd nTszzbe4UgJa893o7VPb+f9WNmzXsaYWL8qAjs+yKtHAOvWvpw5sAuK18W+BTmASlj+m cHsSc6gtVK38Kf1JUEDfQqIu+e7NhgV9nXOIz/ALk907PKofYdaiyX07avNASZVhxxZ1 7Re7HgJhL9IUCY0Kta87h//C/vUfdr2Xc11qJUnHFnwjdXsyOtmfpQczmJ9RR4D8EyWa hK3m8G9/CIJcKyONl3IXJRz3uL2T4kQlitMJdZ+ZSqyYk3JYIejSjdbX3fqcVBYLJ7wv ptDA== 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 y187-v6si425101pgd.459.2018.07.03.00.08.22; Tue, 03 Jul 2018 00:08:37 -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 S1753591AbeGCHDz (ORCPT + 99 others); Tue, 3 Jul 2018 03:03:55 -0400 Received: from mail.steuer-voss.de ([85.183.69.95]:55098 "EHLO mail.steuer-voss.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752719AbeGCHDx (ORCPT ); Tue, 3 Jul 2018 03:03:53 -0400 X-Virus-Scanned: Debian amavisd-new at mail.steuer-voss.de Received: by mail.steuer-voss.de (Postfix, from userid 1000) id 4E3D241C51; Tue, 3 Jul 2018 09:03:48 +0200 (CEST) Message-Id: From: Nikolaus Voss Date: Tue, 3 Jul 2018 08:34:20 +0200 Subject: [PATCH v2 0/2] IIO: st_sensors_i2c: improve device enumeration To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Lorenzo Bianconi , Linus Walleij , Xiongfeng Wang , Andy Shevchenko , nv@vosn.de Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When trying to instantiate a st_accel_i2c device from an ACPI based system, I ran into some problems: For my device, there is no ACPI match table entry, so rather than creating /allocating a new ACPI HID for the device, I wanted to use an existing DT table compatible entry via creating an ACPI_DT_NAMESPACE_HID /PRP0001 HID ACPI entry (see Documentation/acpi/enumeration.txt). This did not work because st_accel_i2c.c bails out if there is a ACPI node but no ACPI table match. Use device_get_match_data API to get the right driver data. acpi_device_get_match_data() currently doesn't return DT compatible matches. A separate patch is submitted to fix this. v2: - use device_get_match_data API as suggested by Andy Shevchenko - removed syncing DT/I2C table names as Jonathan Cameron pointed out this would be an ABI change - converting from probe() to probe_new() is moved into a separate patch (as suggested by Jonathan Cameron) Nikolaus Voss (2): IIO: st_accel_i2c.c: Simplify access to driver data IIO: st_accel_i2c.c: Use probe_new() instead of probe() drivers/iio/accel/st_accel_i2c.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) -- 2.17.1