Return-Path: Message-ID: <1514995927.7000.582.camel@linux.intel.com> Subject: Re: [PATCH v2 10/10] Bluetooth: hci_bcm: Support Apple GPIO handling From: Andy Shevchenko To: Lukas Wunner , Marcel Holtmann , Johan Hedberg Cc: Mika Westerberg , Frederic Danis , Loic Poulain , Hans de Goede , Max Shavrick , Leif Liddy , Daniel Roschka , Ronald Tschalaer , "Peter Y. Chuang" , linux-bluetooth@vger.kernel.org Date: Wed, 03 Jan 2018 18:12:07 +0200 In-Reply-To: <477d9c5294b1d1df06942cd1c30238d91d900253.1514916630.git.lukas@wunner.de> References: <477d9c5294b1d1df06942cd1c30238d91d900253.1514916630.git.lukas@wunner.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-ID: On Tue, 2018-01-02 at 20:08 +0100, Lukas Wunner wrote: > Enable Bluetooth on the following Macs which provide custom ACPI > methods > to toggle the GPIOs for device wake and shutdown instead of accessing > the pins directly: > +static inline int bcm_apple_get_resources(struct bcm_device *dev) > +{ return -EOPNOTSUPP; } > +static inline int bcm_apple_set_power(struct bcm_device *dev, bool > powered) > +{ return -EOPNOTSUPP; } > +static inline int bcm_apple_set_low_power(struct bcm_device *dev, > bool enable) > +{ return -EOPNOTSUPP; } > Might be a silly question but can we create some struct with callbacks and assign it differently based on Apple / non-Apple cases? In that case you don't need conditionals to call (you will always have them defined to something). -- Andy Shevchenko Intel Finland Oy