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] [day] [month] [year] [list]
Message-ID: <518397C60809E147AF5323E0420B992E3E99B4C1@DBDE01.ent.ti.com>
Date:	Thu, 6 Sep 2012 06:51:53 +0000
From:	"Philip, Avinash" <avinashphilip@...com>
To:	"thierry.reding@...onic-design.de" <thierry.reding@...onic-design.de>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Nori, Sekhar" <nsekhar@...com>,
	"Hebbar, Gururaja" <gururaja.hebbar@...com>
Subject: RE: [PATCH] pwm: pwm-tiecap: Disable APWM mode after configure

Hi Thierry,

If you do not have any comments, could you please accept it?

Thanks
Avinash

On Thu, Aug 23, 2012 at 12:29:46, Philip, Avinash wrote:
> APWM mode is enabled while configuring PWM device. This was done to
> handle shadow & immediate mode update of period and compare registers.
> However, leaving it enabled after configuring will cause APWM output on
> PWM pin even before enabling PWM device.
> Fix the same by disabling APWM mode after configuring if PWM device is
> not running.
> 
> Signed-off-by: Philip, Avinash <avinashphilip@...com>
> ---
> :100644 100644 0b66d0f... 4b66889... M	drivers/pwm/pwm-tiecap.c
>  drivers/pwm/pwm-tiecap.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c
> index 0b66d0f..4b66889 100644
> --- a/drivers/pwm/pwm-tiecap.c
> +++ b/drivers/pwm/pwm-tiecap.c
> @@ -100,6 +100,13 @@ static int ecap_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
>  		writel(period_cycles, pc->mmio_base + CAP3);
>  	}
>  
> +	if (!test_bit(PWMF_ENABLED, &pwm->flags)) {
> +		reg_val = readw(pc->mmio_base + ECCTL2);
> +		/* Disable APWM mode to put APWM output Low */
> +		reg_val &= ~ECCTL2_APWM_MODE;
> +		writew(reg_val, pc->mmio_base + ECCTL2);
> +	}
> +
>  	pm_runtime_put_sync(pc->chip.dev);
>  	return 0;
>  }
> -- 
> 1.7.1
> 
> 

--
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