Exemplo n.º 1
0
static int __init scpsys_probe_mt8173(struct platform_device *pdev)
{
	struct scp *scp;
	struct genpd_onecell_data *pd_data;
	int ret;

	scp = init_scp(pdev, scp_domain_data_mt8173, NUM_DOMAINS_MT8173);
	if (IS_ERR(scp))
		return PTR_ERR(scp);

	mtk_register_power_domains(pdev, scp, NUM_DOMAINS_MT8173);

	pd_data = &scp->pd_data;

	ret = pm_genpd_add_subdomain(pd_data->domains[MT8173_POWER_DOMAIN_MFG_ASYNC],
		pd_data->domains[MT8173_POWER_DOMAIN_MFG_2D]);
	if (ret && IS_ENABLED(CONFIG_PM))
		dev_err(&pdev->dev, "Failed to add subdomain: %d\n", ret);

	ret = pm_genpd_add_subdomain(pd_data->domains[MT8173_POWER_DOMAIN_MFG_2D],
		pd_data->domains[MT8173_POWER_DOMAIN_MFG]);
	if (ret && IS_ENABLED(CONFIG_PM))
		dev_err(&pdev->dev, "Failed to add subdomain: %d\n", ret);

	return 0;
}
Exemplo n.º 2
0
server::server()// : httpserver(8080, 10)
{
	// configure logging
	dcmtk::log4cplus::SharedAppenderPtr logfile(new NDCAsFilenameAppender("C:\\PACS\\Log"));
	dcmtk::log4cplus::Logger my_log = dcmtk::log4cplus::Logger::getRoot();
	my_log.addAppender(logfile);

	// do server wide init	
	Poco::Data::MySQL::Connector::registerConnector();

	config::registerCodecs();

	config::createDBPool();

	std::string errormsg;
	if(!config::test(errormsg))
	{		
		DCMNET_ERROR(errormsg);
		DCMNET_INFO("Exiting");
		
		throw new std::exception(errormsg.c_str());
	}

	// add scp
	init_scp();
	io_service_.post(boost::bind(&MyDcmSCPPool::listen, &storageSCP));

	// add sender
	io_service_.post(boost::bind(&SenderService::run, &senderService));	

	// add REST API
	httpserver.shutdownCallback = boost::bind(&server::stop, this);

	io_service_.post(boost::bind(&HttpServer::start, &httpserver));
}
Exemplo n.º 3
0
static int __init scpsys_probe_mt2701(struct platform_device *pdev)
{
	struct scp *scp;

	scp = init_scp(pdev, scp_domain_data_mt2701, NUM_DOMAINS_MT2701);
	if (IS_ERR(scp))
		return PTR_ERR(scp);

	mtk_register_power_domains(pdev, scp, NUM_DOMAINS_MT2701);

	return 0;
}