On 3/4/21 11:08 PM, Simon Glass wrote: > Hi Sean, > > On Mon, 1 Mar 2021 at 15:46, Sean Anderson <sean.ander...@seco.com> wrote: >> >> This updates sysinfo documentation to document that detect() must be >> called first. This allows drivers to cache information in detect() and >> perform (cheaper) retrieval in the other accessors. This also modifies >> the only instance where this sequencing was not followed. >> >> Signed-off-by: Sean Anderson <sean.ander...@seco.com> >> --- >> >> common/spl/spl_fit.c | 4 ++++ >> include/sysinfo.h | 29 ++++++++++++++++++++--------- >> 2 files changed, 24 insertions(+), 9 deletions(-) > > Reviewed-by: Simon Glass <s...@chromium.org> > > Is it possible to enforce this in the uclass? So have the uclass call detect() if it hasn't been called? Should there be a way to re-detect? > Also I think -EPERM or -EACCES might be better than -ENOENT. Hm, I thought I saw gazerbeam using ENOENT for this purpose, but on further review it looks like it does not. I think EPERM is good for this. --Sean
- [PATCH 0/5] sysinfo: Add gpio sysinfo driver Sean Anderson
- [PATCH 1/5] dm: gpio: Fix gpio_get_list_count failing w... Sean Anderson
- [PATCH 2/5] sysinfo: Provide some global/default IDs Sean Anderson
- Re: [PATCH 2/5] sysinfo: Provide some global/defaul... Simon Glass
- Re: [PATCH 2/5] sysinfo: Provide some global/de... Sean Anderson
- [PATCH 3/5] sysinfo: Require that sysinfo_detect be cal... Sean Anderson
- Re: [PATCH 3/5] sysinfo: Require that sysinfo_detec... Simon Glass
- Re: [PATCH 3/5] sysinfo: Require that sysinfo_d... Sean Anderson
- Re: [PATCH 3/5] sysinfo: Require that sysin... Simon Glass
- [PATCH 5/5] test: Add gpio-sysinfo test Sean Anderson
- Re: [PATCH 5/5] test: Add gpio-sysinfo test Simon Glass
- [PATCH 4/5] sysinfo: Add gpio-sysinfo driver Sean Anderson
- Re: [PATCH 4/5] sysinfo: Add gpio-sysinfo driver Sean Anderson
- Re: [PATCH 4/5] sysinfo: Add gpio-sysinfo drive... Simon Glass
- Re: [PATCH 4/5] sysinfo: Add gpio-sysinfo d... Sean Anderson
- Re: [PATCH 4/5] sysinfo: Add gpio-sysi... Simon Glass
- Re: [PATCH 4/5] sysinfo: Add gpio-... Sean Anderson
- Re: [PATCH 4/5] sysinfo: Add g... Simon Glass