Release 4.14 arch/sh/include/cpu-sh3/cpu/dac.h
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_CPU_SH3_DAC_H
#define __ASM_CPU_SH3_DAC_H
/*
* Copyright (C) 2003 Andriy Skulysh
*/
#define DADR0 0xa40000a0
#define DADR1 0xa40000a2
#define DACR 0xa40000a4
#define DACR_DAOE1 0x80
#define DACR_DAOE0 0x40
#define DACR_DAE 0x20
static __inline__ void sh_dac_enable(int channel)
{
unsigned char v;
v = __raw_readb(DACR);
if(channel) v |= DACR_DAOE1;
else v |= DACR_DAOE0;
__raw_writeb(v,DACR);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 39 | 95.12% | 1 | 50.00% |
Paul Mundt | 2 | 4.88% | 1 | 50.00% |
Total | 41 | 100.00% | 2 | 100.00% |
static __inline__ void sh_dac_disable(int channel)
{
unsigned char v;
v = __raw_readb(DACR);
if(channel) v &= ~DACR_DAOE1;
else v &= ~DACR_DAOE0;
__raw_writeb(v,DACR);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 41 | 95.35% | 1 | 50.00% |
Paul Mundt | 2 | 4.65% | 1 | 50.00% |
Total | 43 | 100.00% | 2 | 100.00% |
static __inline__ void sh_dac_output(u8 value, int channel)
{
if(channel) __raw_writeb(value,DADR1);
else __raw_writeb(value,DADR0);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 30 | 93.75% | 1 | 50.00% |
Paul Mundt | 2 | 6.25% | 1 | 50.00% |
Total | 32 | 100.00% | 2 | 100.00% |
#endif /* __ASM_CPU_SH3_DAC_H */
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 144 | 95.36% | 2 | 50.00% |
Paul Mundt | 6 | 3.97% | 1 | 25.00% |
Greg Kroah-Hartman | 1 | 0.66% | 1 | 25.00% |
Total | 151 | 100.00% | 4 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.