uboot/drivers/misc/pwrseq-uclass.c
<<
>>
Prefs
   1/*
   2 * Copyright (c) 2015 Google, Inc
   3 *
   4 * SPDX-License-Identifier:     GPL-2.0+
   5 */
   6
   7#include <common.h>
   8#include <dm.h>
   9#include <pwrseq.h>
  10
  11int pwrseq_set_power(struct udevice *dev, bool enable)
  12{
  13        struct pwrseq_ops *ops = pwrseq_get_ops(dev);
  14
  15        if (!ops->set_power)
  16                return -ENOSYS;
  17
  18        return ops->set_power(dev, enable);
  19}
  20
  21UCLASS_DRIVER(pwrseq) = {
  22        .id             = UCLASS_PWRSEQ,
  23        .name           = "pwrseq",
  24};
  25