08 Nov, 2018

2 commits


29 Oct, 2018

32 commits


04 Oct, 2018

1 commit

  • commit fb6de923ca3358a91525552b4907d4cb38730bdd upstream.

    dev_set_drvdata() needs to be called before device_register()
    exposes device to userspace. Otherwise kernel crashes after it
    gets null pointer from dev_get_drvdata() when userspace tries
    to access sysfs entries.

    [Removed backtrace for length -- broonie]

    Signed-off-by: Yu Zhao
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Yu Zhao
     

03 Aug, 2018

2 commits

  • [ Upstream commit 02f3703934a42417021405ef336fe45add13c3d1 ]

    In of_get_regulation_constraints() we were taking the result of
    of_map_mode() (an unsigned int) and assigning it to an int. We were
    then checking whether this value was -EINVAL. Some implementers of
    of_map_mode() were returning -EINVAL (even though the return type of
    their function needed to be unsigned int) because they needed to
    signal an error back to of_get_regulation_constraints().

    In general in the regulator framework the mode is always referred to
    as an unsigned int. While we could fix this to be a signed int (the
    highest value we store in there right now is 0x8), it's actually
    pretty clean to just define the regulator mode 0x0 (the lack of any
    bits set) as an invalid mode. Let's do that.

    Fixes: 5e5e3a42c653 ("regulator: of: Add support for parsing initial and suspend modes")
    Suggested-by: Javier Martinez Canillas
    Signed-off-by: Douglas Anderson
    Reviewed-by: Javier Martinez Canillas
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Douglas Anderson
     
  • [ Upstream commit 0b01fd3d40fe6402e5fa3b491ef23109feb1aaa5 ]

    If is_enabled() is not defined, regulator core will assume
    this regulator is already enabled, then it can NOT be really
    enabled after disabled.

    Based on Li Jun's patch from the NXP kernel tree.

    Signed-off-by: Anson Huang
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Anson Huang
     

30 May, 2018

2 commits


15 Mar, 2018

1 commit

  • commit f63248fac563125fd5a2f0bc780ce7a299872cab upstream.

    stm32_vrefbuf_enable() wrongly checks VRR bit: 0 stands for not ready,
    1 for ready. It currently checks the opposite.
    This makes enable routine to exit immediately without waiting for ready
    flag.

    Fixes: 0cdbf481e927 ("regulator: Add support for stm32-vrefbuf")
    Signed-off-by: Fabrice Gasnier
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Fabrice Gasnier