Re: [PATCH] gpio: rcar: Improve clock error handling and reporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 24, 2015 at 4:05 PM, Geert Uytterhoeven
<geert+renesas@xxxxxxxxx> wrote:

> If the Renesas R-Car GPIO driver cannot find a functional clock, it
> prints a warning, .e.g.
>
>         gpio_rcar ffc40000.gpio: unable to get clock
>
> and continues, as the clock is optional, depending on the SoC type.
> This warning may confuse users.
>
> To fix this, add a flag to indicate that the clock is mandatory or
> optional:
>   - If the clock is mandatory (on R-Car Gen2), a missing clock is now
>     treated as a fatal error,
>   - If the clock is optional (on R-Car Gen1), the warning is no longer
>     printed.
>
> The new flag is merged with the existing has_both_edge_trigger boolean
> into a bitfield to save space.

*DON'T* try to save bits in a megabyte kernel like this.
The better readability is worth the extra bits or bytes it takes.
Besides, did you really try to compile it before/after that change
to verify that it actually saved that space?

> Suggested-by: Magnus Damm <magnus.damm@xxxxxxxxx>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
> This depends on "gpio: rcar: Remove obsolete platform data support".

Where is that patch? This does not apply to my tree,
probably because of this.

Please sent the patches in a series.

>         unsigned has_both_edge_trigger:1;
> +       unsigned needs_clk:1;

both should be bool and assigned true/false.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux