Commit 8267c532 authored by Federico Vaga's avatar Federico Vaga

lib: add error for driver incompatibility

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 3c981f75
......@@ -34,6 +34,7 @@ extern "C" {
#define ADC_OFF_AC_RESTORE_S 1037
#define ADC_OFF_AC_RESTORE_R 1038
#define ADC_ENOFLAGS 1039
#define ADC_EDRVVERSION 1040
/**
* Opaque type. any instance of this should be used as token
......
......@@ -216,7 +216,7 @@ static struct adc_dev *adc_100m14b4cha_open(const struct adc_board_type *b,
int err, bits;
if (!adc_100m14b4cha_is_driver_compatible()) {
errno = EPERM;
errno = ADC_EDRVVERSION;
return NULL;
}
......
......@@ -36,6 +36,7 @@ static struct adc_errors {
{ADC_OFF_AC_RESTORE_S, "Offset auto-clear: cannot store configuration"},
{ADC_OFF_AC_RESTORE_R, "Offset auto-clear: cannot restore configuration"},
{ADC_ENOFLAGS, "Unsupported flags"},
{ADC_EDRVVERSION, "Incompatible driver version"},
{ 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