lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpon7e0+PhikmHkgcY30gEH0v+nYJzctA-0wN7w+oDRO7Vw@mail.gmail.com>
Date:	Mon, 22 Oct 2012 19:25:45 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	thierry.reding@...onic-design.de,
	Shiraz Hashim <shiraz.hashim@...com>
Cc:	linux-kernel@...r.kernel.org, spear-devel@...t.st.com
Subject: Re: [PATCH V4] PWM: Add SPEAr PWM chip driver support

On 22 October 2012 16:36, Shiraz Hashim <shiraz.hashim@...com> wrote:
> Add support for PWM chips present on SPEAr platforms. These PWM
> chips support 4 channel output with programmable duty cycle and
> frequency.
>
> More details on these PWM chips can be obtained from relevant
> chapter of reference manual, present at following[1] location.
>
> 1. http://www.st.com/internet/mcu/product/251211.jsp
>
> Cc: Thierry Reding <thierry.reding@...onic-design.de>
> Signed-off-by: Shiraz Hashim <shiraz.hashim@...com>
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
> Reviewed-by: Vipin Kumar <vipin.kumar@...com>

Acked-by: Viresh Kumar <viresh.kumar@...aro.org>

> diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c
> +static int spear_pwm_probe(struct platform_device *pdev)
> +{

> +       ret = pwmchip_add(&pc->chip);
> +       if (ret < 0) {
> +               dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
> +               return ret;
> +       }

Sorry couldn't think of this complex situation earlier :(

Can it happen that we get a request for a pwm here and its config or enable
gets called...?

If yes, then we must call clk_prepare() before doing pwmchip_add?? Otherwise
you will see a crash :)

@Thierry: Can this happen?

> +       ret = clk_prepare_enable(pc->clk);
> +       if (ret < 0)
> +               return pwmchip_remove(&pc->chip);

--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ