Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1180535imm; Wed, 4 Jul 2018 13:18:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc3HaIgTapNvoFPV9HafqKUX2mR5+ByQxb9LL8jCNauj9dAKMPaDzlcFF5ILiKmwdqUCdWc X-Received: by 2002:a63:6345:: with SMTP id x66-v6mr3128422pgb.43.1530735529712; Wed, 04 Jul 2018 13:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530735529; cv=none; d=google.com; s=arc-20160816; b=rL6Z5HOjYFxRh8ms09AA/Kyf1jm+d7Zr2CwCXMKoD3otkz4yTMUVef15M8zK/lMR79 EdeWKbxyiaKc7jw6ZO1dggztqjVHTvX5jKBrfAlXBPaixAokz0UHOyWVj9ZCHiYZDCee 15cdVyzCf4zOXaeW5OWfP6WPbaVQvUDzNmATpYnlwk1RgkwPlA+Gmmk+RXcRyKW7sR1V PKMnjuJC+lC6GPd88FcOpY9L5Ov6oMHy21rTWCAyia+IosrdLu/KTvQAZDA/9ZKQC8yt 0xvdwoE6ZuekcndfbqUCqFBsKxrWgsRHiPz8c5vR6Posk0KZGxuohpfy8uD5sI8Of1+p NFLQ== 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=qybflPsN6kGJ+bgC3aHCtFi0PS0cNdNZq5H1lpqwMK4=; b=t3a/Peg3t7TowUPx7XzkBbtNuWmFNMwNKI/xYIUgc8GvNmJcVVbxZ9MarrV9SenG2y KM5aX6m9t/Qu49LGHCitriaWeunY4XXRm0+WAWJrr+V8EviLca84xyE0wmvOzym75QjV ntG409fq1E6z9E4hzzYhuMtnY2jUQb8PyO7RCDzCdD2viGvkp1u9f3hPhergL1j/QKYq JetYcxecAbnlGFuzSxzDSMcqjze62RGXnvZqHh07h07lotB9Ac3zq2kxqWPIjg89S7tL R6QAsRBYSBk6yX1u9SkcxygQ9P+WLZ9gtmDyut7TcyUJ4Tj/97oxfjQ2/fbfMhV+b8hS Bn6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hj26vIXq; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 132-v6si4277075pfy.293.2018.07.04.13.18.34; Wed, 04 Jul 2018 13:18:49 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hj26vIXq; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753038AbeGDURi (ORCPT + 99 others); Wed, 4 Jul 2018 16:17:38 -0400 Received: from mail-vk0-f66.google.com ([209.85.213.66]:46369 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752874AbeGDURg (ORCPT ); Wed, 4 Jul 2018 16:17:36 -0400 Received: by mail-vk0-f66.google.com with SMTP id b14-v6so3658429vke.13; Wed, 04 Jul 2018 13:17:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qybflPsN6kGJ+bgC3aHCtFi0PS0cNdNZq5H1lpqwMK4=; b=hj26vIXqzSRSi+L5IFA3JW2xhDt7au8ZbGSNV3bqkpw0pQ8E05rhOvs16lnXvecT7J 1leXzEYDo630OeQBWW9w6pLXPn8GJTBoJKB+er7PW8PYXkuxKmzLNjpOnq2LvCNfjtCU gcKhoQfiARbIuC7+EsqvQU44Pv3em/hKzl8xS7SEXgjJm5GiaTVqOUU7Q6soAIZZ3IKB YfLbQQtIBGGFRGBciOWdCBsyxdNP+qXUK+ignI1XL4W0o9/VwwQJm35Fk4/FkQWCPwr0 R2iDFlFL7wN4UYso/lbaPDMsPjjVtK79qry0ohPCzgdxB8JHF07aSZ8V1lkQzf3HY/IC Uevg== 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=qybflPsN6kGJ+bgC3aHCtFi0PS0cNdNZq5H1lpqwMK4=; b=gCiJSY+PdT2HNrJEWmJ6R1KV8uWMjlTnA8JusUWwfyYp1d7h06+hyIUxyIFISfx7FJ R9hnhj4riYhehETDV2TQpRUSaHWj204F/tXlRBaOkP201QpxAHxLGUcj5dlRJMGcKB9x /JzS3Is3KMsw23oRPi+NO9btE5gtBGAdVdxyCJ++ANxAs2W0pGJljsaf1aHgszfSkgZ/ cqIhPbGPxfbJK0Za6y9aQe98xw9gkDf1G38II2ulkQUL8TOoMI52W9NaFkoMrOaT+c0l KlUT8h55BcOnpg77orBrM+6wmHIDtXBq4akLfqo4ES26b3u9Z7WrHxhPlD9yjKBJj2fC zuVA== X-Gm-Message-State: APt69E2copSiFtT4eTxpreEFMP5hxFBNQR5LJAzHlrj0x2SBmQxSKG/+ +rgoLYmC5GViam/6R0e1tOrsk0uAJcmRqvG6CTs= X-Received: by 2002:a1f:7d09:: with SMTP id y9-v6mr1846448vkc.15.1530735456059; Wed, 04 Jul 2018 13:17:36 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:2149:0:0:0:0:0 with HTTP; Wed, 4 Jul 2018 13:17:35 -0700 (PDT) In-Reply-To: References: <62fb47ea-9296-139b-1eeb-28ddc5826091@landley.net> From: Andy Shevchenko Date: Wed, 4 Jul 2018 23:17:35 +0300 Message-ID: Subject: Re: [PATCH] Fix platform data in leds-pca955x.c To: Rob Landley Cc: clg@kaod.org, Jacek Anaszewski , Pavel Machek , Andrew Jeffery , Linux LED Subsystem , Linux Kernel Mailing List 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 Wed, Jul 4, 2018 at 9:09 PM, Rob Landley wrote: > On 07/04/2018 12:04 PM, Andy Shevchenko wrote: >> On Wed, Jul 4, 2018 at 8:00 PM, Andy Shevchenko >> wrote: >>> On Wed, Jul 4, 2018 at 3:46 AM, Rob Landley wrote: >> >>> For now, you can switch to unified device properties API (basically >>> un-ifdef pca955x_pdata_of_init() and replacing of_* by device_* or >>> fwnode_* compatible calls) and providing a static table of built-in >>> device properties in the platform code in question. >>> (see include/linux/property.h, for example users of >>> PROPERTY_ENTRY_U*() macros, like arch/arm/mach-pxa/raumfeld.c) >> >> Taking into consideration that device is enumerated by i2c core, which >> is being aware of device properties (1), better example might be >> drivers/platform/x86/intel_cht_int33fe.c > > This file doesn't include the word "LED". Should it? You seems missed a point completely. > > $ grep -i led drivers/platform/x86/intel_cht_int33fe.c > $ > > Examining it... this is an ACPI driver, Intel's Not-Invented-Here proprietary > device tree. Huh?! > So I should convert an sh7760 board to ACPI? NO! (Of cource if you have ACPI ID and meaning of that device on ACPI enabled platform, then it's your choice) > How would this fix the problem > where the driver's probe function expects a structure as input that is locally > defined, instead of the generic structure from linux/leds.h it used to accept? You missed a point. > If we feed the probe function NULL platform data _and_ don't have device tree > enabled, doesn't it error out? No. -- With Best Regards, Andy Shevchenko