From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753636AbcBVPi0 (ORCPT ); Mon, 22 Feb 2016 10:38:26 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:36116 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752474AbcBVPiY convert rfc822-to-8bit (ORCPT ); Mon, 22 Feb 2016 10:38:24 -0500 Subject: Re: [PATCH 1/1] of/overlay: of overlay callbacks Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: text/plain; charset=utf-8 From: Pantelis Antoniou In-Reply-To: <20160222025517.GS15973@rob-hp-laptop> Date: Mon, 22 Feb 2016 17:38:19 +0200 Cc: Alan Tull , Frank Rowand , Grant Likely , Devicetree List , Linux Kernel Mailing List , Moritz Fischer , Alan Tull , Dinh Nguyen Content-Transfer-Encoding: 8BIT Message-Id: <6F671B0F-4F94-47F0-9CA2-04E6F905F20A@konsulko.com> References: <1455730885-1514-1-git-send-email-atull@opensource.altera.com> <1455730885-1514-2-git-send-email-atull@opensource.altera.com> <20160222025517.GS15973@rob-hp-laptop> To: Rob Herring X-Mailer: Apple Mail (2.3112) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, > On Feb 22, 2016, at 04:55 , Rob Herring wrote: > > On Wed, Feb 17, 2016 at 11:41:25AM -0600, Alan Tull wrote: >> Add overlay callback functionality. >> >> When DT overlays are being added, some drivers/subsystems >> will want to know about the changes before they go into the >> live tree. Similarly there is a need for post-remove >> callbacks. >> >> Each handler is registered with a of_device_id. When >> an overlay target matches a handler's id, the handler >> gets called. >> >> The following 4 cases are handled: pre-apply, post-apply, >> pre-remove, and post-remove. > > So I know I suggested maybe not using notifiers, but this ends up just > looking like notifiers, so we might as well use them unless we somehow > change the flow. You would just need to add pre-apply and pre-remove > in of_attach_node and of_detach_node, right? > I agree those look just like notifiers. We could just update the notifier logic to handle this case. Am I missing something else? > Rob Regards — Pantelis