Commit e3fc1b13 authored by Federico Vaga's avatar Federico Vaga

kernel: enable software trigger by default

Enabling the software trigger by default it does not cause any harm and
it simplifies the code and the interface. The user is free to disable it
using the `source` attribute from sysfs.
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent e3700a3a
......@@ -412,8 +412,9 @@ static int __fa_init(struct fa_dev *fa)
/* Set to single shot mode by default */
fa_writel(fa, fa->fa_adc_csr_base, &zfad_regs[ZFAT_SHOTS_NB], 1);
/* No trigger source enabled by default */
fa_writel(fa, fa->fa_adc_csr_base, &zfad_regs[ZFAT_CFG_SRC], 0);
/* Enable the software trigger by default: there is no arm in this */
fa_writel(fa, fa->fa_adc_csr_base, &zfad_regs[ZFAT_CFG_SRC],
FA100M14B4C_TRG_SRC_SW);
/* Zero offsets and release the DAC clear */
zfad_reset_offset(fa);
......
......@@ -33,7 +33,8 @@ static struct zio_attribute zfat_ext_zattr[] = {
[FA100M14B4C_TATTR_STA] = ZIO_ATTR_EXT("source-triggered", ZIO_RW_PERM,
ZFAT_CFG_STA, 0),
[FA100M14B4C_TATTR_SRC] = ZIO_ATTR_EXT("source", ZIO_RW_PERM,
ZFAT_CFG_SRC, 0),
ZFAT_CFG_SRC,
FA100M14B4C_TRG_SRC_SW),
[FA100M14B4C_TATTR_POL] = ZIO_ATTR_EXT("polarity", ZIO_RW_PERM,
ZFAT_CFG_POL, 0),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment