Re: [PATCH v4 10/10] power: bq24257: Add platform data based initialization
From: Krzysztof Kozlowski <hidden>
Date: 2015-09-17 00:16:37
Also in:
linux-pm
From: Krzysztof Kozlowski <hidden>
Date: 2015-09-17 00:16:37
Also in:
linux-pm
On 17.09.2015 05:11, Andreas Dannenberg wrote:
On Wed, Sep 16, 2015 at 05:31:58PM +0900, Krzysztof Kozlowski wrote:quoted
quoted
@@ -1087,7 +1176,13 @@ static int bq24257_probe(struct i2c_client *client, return ret; } - if (client->irq <= 0) + /* + * When using device firmware we either take the IRQ specified directly + * or probe for a pin named BQ24257_STAT_IRQ. In case of using platform + * data always run the IRQ pin probe function to finish IRQ and GPIO + * setup based on the stat pin specified in the platform data. + */Why?The original driver would allow configuring the IRQ either through client->irq or through a separete DT entry called "stat_gpios" (which seems redundant... might it be required for ACPI? Or...?). I modeled the configuration via pdata the same way, this way aligning the fields in the pdata structure with the DT entries. Let me know if you have a preference to simplify this.
Right, it makes sense now. Best regards, Krzysztof