Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755021AbcDDK0D (ORCPT ); Mon, 4 Apr 2016 06:26:03 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:33591 "EHLO mail-lb0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754010AbcDDKZ6 (ORCPT ); Mon, 4 Apr 2016 06:25:58 -0400 MIME-Version: 1.0 In-Reply-To: <20160402162449.GB2350@sirena.org.uk> References: <1459417026-6697-1-git-send-email-octavian.purdila@intel.com> <1459417026-6697-7-git-send-email-octavian.purdila@intel.com> <20160331172935.GL2350@sirena.org.uk> <20160401140856.GW2350@sirena.org.uk> <20160402162449.GB2350@sirena.org.uk> Date: Mon, 4 Apr 2016 13:25:56 +0300 Message-ID: Subject: Re: [RFC PATCH 06/10] spi: add support for ACPI reconfigure notifications From: Octavian Purdila To: Mark Brown Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Len Brown , Matt Fleming , Wolfram Sang , Joel Becker , Christoph Hellwig , "linux-acpi@vger.kernel.org" , linux-efi@vger.kernel.org, linux-i2c , linux-spi@vger.kernel.org, lkml , Irina Tirdea Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1455 Lines: 28 On Sat, Apr 2, 2016 at 7:24 PM, Mark Brown wrote: > On Fri, Apr 01, 2016 at 09:26:38PM +0200, Rafael J. Wysocki wrote: >> On Fri, Apr 1, 2016 at 4:08 PM, Mark Brown wrote: > >> > That's not the point. The point is that since the handling is identical >> > why are we handling it through exactly the same code? > >> I think that during the initial enumeration the controller driver's >> probe walks the children and creates device objects for them. When a >> table is loaded later, the controller driver has been probed already >> and there needs to be a way to trigger a walk over the (new) children >> from it. > >> Or a hook somewhere around acpi_platform_notify() is needed. > > What I don't understand is why the flow on inital probe isn't simply to > register the controller which then triggers the walk of the children. > That way any bus that supports initial probe also supports hotplug > without needing to go and manually add a second code path. Do you mean register the notifier per controller instead of per subsystem? Either way we need changes at the subsystem level and I choose to follow the device tree implementation for consistency. The other reason is that (pending other ACPICA changes) we can add other notification events in the future such as node added or removed (just like device tree), and in that case the probe and hotplug handling would be different (and a bit more efficient).