Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755950AbbGUVga (ORCPT ); Tue, 21 Jul 2015 17:36:30 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:35734 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755349AbbGUVg3 (ORCPT ); Tue, 21 Jul 2015 17:36:29 -0400 Date: Tue, 21 Jul 2015 14:36:25 -0700 From: Brian Norris To: Florian Fainelli Cc: Thomas Gleixner , Gregory Fong , bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, Kevin Cernekee , Jason Cooper Subject: Re: [PATCH 1/2] genirq: add chip_{suspend,resume} PM support to irq_chip Message-ID: <20150721213625.GO24125@google.com> References: <20150619224123.GL4917@ld-irv-0074> <1434756403-379-1-git-send-email-computersforpeace@gmail.com> <55AE8E5D.8020700@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55AE8E5D.8020700@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1243 Lines: 34 Hi Florian, Thomas, On Tue, Jul 21, 2015 at 11:24:29AM -0700, Florian Fainelli wrote: > On 20/06/15 07:11, Thomas Gleixner wrote: > > On Fri, 19 Jun 2015, Brian Norris wrote: ... > > I really don't want to set a precedent for random (*foo)(*bar) > > callbacks. > > > >> + > >> + if (ct->chip.chip_suspend) > >> + ct->chip.chip_suspend(gc); > > > > So wouldn't it be the more intuitive solution to make this a callback > > in the struct gc itself? > > Brian can correct me, but his approach is more generic, if there is > another irqchip driver needing a similar infrastructure, this would be > already there, and directly usable. Maybe all we need to is to change > the chip_suspend/resume arguments to pass a reference to irq_chip instead? I believe Thomas is right. We could just make these into irq_chip_generic callbacks, which would probably be the right abstraction level. Wouldn't be much code change from this submission, AFAICT. (Sorry for dropping the ball on this one.) Brian -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/