403Webshell
Server IP : 104.21.38.3  /  Your IP : 108.162.226.3
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/src/linux-headers-5.15.0-142/include/linux/greybus/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/src/linux-headers-5.15.0-142/include/linux/greybus/bundle.h
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Greybus bundles
 *
 * Copyright 2014 Google Inc.
 * Copyright 2014 Linaro Ltd.
 */

#ifndef __BUNDLE_H
#define __BUNDLE_H

#include <linux/types.h>
#include <linux/list.h>
#include <linux/pm_runtime.h>
#include <linux/device.h>

#define	BUNDLE_ID_NONE	U8_MAX

/* Greybus "public" definitions" */
struct gb_bundle {
	struct device		dev;
	struct gb_interface	*intf;

	u8			id;
	u8			class;
	u8			class_major;
	u8			class_minor;

	size_t			num_cports;
	struct greybus_descriptor_cport *cport_desc;

	struct list_head	connections;
	u8			*state;

	struct list_head	links;	/* interface->bundles */
};
#define to_gb_bundle(d) container_of(d, struct gb_bundle, dev)

/* Greybus "private" definitions" */
struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id,
				   u8 class);
int gb_bundle_add(struct gb_bundle *bundle);
void gb_bundle_destroy(struct gb_bundle *bundle);

/* Bundle Runtime PM wrappers */
#ifdef CONFIG_PM
static inline int gb_pm_runtime_get_sync(struct gb_bundle *bundle)
{
	int retval;

	retval = pm_runtime_get_sync(&bundle->dev);
	if (retval < 0) {
		dev_err(&bundle->dev,
			"pm_runtime_get_sync failed: %d\n", retval);
		pm_runtime_put_noidle(&bundle->dev);
		return retval;
	}

	return 0;
}

static inline int gb_pm_runtime_put_autosuspend(struct gb_bundle *bundle)
{
	int retval;

	pm_runtime_mark_last_busy(&bundle->dev);
	retval = pm_runtime_put_autosuspend(&bundle->dev);

	return retval;
}

static inline void gb_pm_runtime_get_noresume(struct gb_bundle *bundle)
{
	pm_runtime_get_noresume(&bundle->dev);
}

static inline void gb_pm_runtime_put_noidle(struct gb_bundle *bundle)
{
	pm_runtime_put_noidle(&bundle->dev);
}

#else
static inline int gb_pm_runtime_get_sync(struct gb_bundle *bundle)
{ return 0; }
static inline int gb_pm_runtime_put_autosuspend(struct gb_bundle *bundle)
{ return 0; }

static inline void gb_pm_runtime_get_noresume(struct gb_bundle *bundle) {}
static inline void gb_pm_runtime_put_noidle(struct gb_bundle *bundle) {}
#endif

#endif /* __BUNDLE_H */

Youez - 2016 - github.com/yon3zu
LinuXploit